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