This commit is contained in:
Nikola Kubiczek 2023-09-25 20:34:27 +02:00
parent 411e9d931f
commit 7f4c76dd1d
Signed by: yaemiku
GPG Key ID: ADC039636B3E4AAB
2 changed files with 12 additions and 12 deletions

View File

@ -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

View File

@ -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