envsubst
This commit is contained in:
parent
411e9d931f
commit
7f4c76dd1d
@ -28,9 +28,9 @@ deploy:
|
|||||||
when: always
|
when: always
|
||||||
extends: [.kube-context]
|
extends: [.kube-context]
|
||||||
image:
|
image:
|
||||||
name: bitnami/kubectl:latest
|
name: registry.yaemiku.dev/kubectl
|
||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
script:
|
script:
|
||||||
- ls
|
- ls
|
||||||
- cat $CI_PROJECT_DIR/deployment.yaml | envsubst | kubectl apply -f -
|
- cat $CI_PROJECT_PATH/deployment.yaml | envsubst | kubectl apply -f -
|
||||||
- kubectl get pods
|
- kubectl get pods
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: hamburger
|
name: $CI_PROJECT_NAME
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: hamburger
|
app: $CI_PROJECT_NAME
|
||||||
replicas: 1
|
replicas: 1
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: hamburger
|
app: $CI_PROJECT_NAME
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: hamburger
|
- name: $CI_PROJECT_NAME
|
||||||
image: "$REGISTRY/$REGISTRY_USERNAME/$CI_PROJECT_NAME"
|
image: "$REGISTRY/$REGISTRY_USERNAME/$CI_PROJECT_NAME"
|
||||||
ports:
|
ports:
|
||||||
- name: app-port
|
- name: app-port
|
||||||
@ -32,32 +32,32 @@ spec:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: hamburger
|
name: $CI_PROJECT_NAME
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: app-svc-port
|
- name: app-svc-port
|
||||||
port: 80
|
port: 80
|
||||||
targetPort: app-port
|
targetPort: app-port
|
||||||
selector:
|
selector:
|
||||||
app: hamburger
|
app: $CI_PROJECT_NAME
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: traefik.containo.us/v1alpha1
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
kind: IngressRoute
|
kind: IngressRoute
|
||||||
metadata:
|
metadata:
|
||||||
name: hamburger
|
name: $CI_PROJECT_NAME
|
||||||
spec:
|
spec:
|
||||||
entryPoints:
|
entryPoints:
|
||||||
- websecure
|
- websecure
|
||||||
routes:
|
routes:
|
||||||
- kind: Rule
|
- kind: Rule
|
||||||
match: Host(`yaemiku.dev`)
|
match: Host(`yaemiku.dev`) || Host(`www.yaemiku.dev`)
|
||||||
services:
|
services:
|
||||||
- kind: Service
|
- kind: Service
|
||||||
name: hamburger
|
name: $CI_PROJECT_NAME
|
||||||
port: app-svc-port
|
port: app-svc-port
|
||||||
tls:
|
tls:
|
||||||
secretName: hamburger-tls
|
secretName: $CI_PROJECT_NAME-tls
|
||||||
certResolver: letsencrypt-prod
|
certResolver: letsencrypt-prod
|
||||||
domains:
|
domains:
|
||||||
- main: yaemiku.dev
|
- main: yaemiku.dev
|
||||||
|
Loading…
Reference in New Issue
Block a user