From ff68c8cd24baef66ebb038d237b8f501c84edde5 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Fri, 6 Sep 2024 16:09:25 +0200 Subject: Add script and configuration for Kubernetes --- k8s/cas-deployment.yaml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 k8s/cas-deployment.yaml (limited to 'k8s/cas-deployment.yaml') diff --git a/k8s/cas-deployment.yaml b/k8s/cas-deployment.yaml new file mode 100644 index 0000000..f070fe4 --- /dev/null +++ b/k8s/cas-deployment.yaml @@ -0,0 +1,47 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cas-deployment +spec: + replicas: 1 + selector: + matchLabels: + app: cas + template: + metadata: + labels: + app: cas + spec: + containers: + - name: cas + image: ghcr.io/cas-4/backend:latest + imagePullPolicy: Always + env: + - name: RUST_LOG + valueFrom: + configMapKeyRef: + name: cas-config + key: RUST_LOG + - name: DATABASE_URL + valueFrom: + configMapKeyRef: + name: cas-config + key: DATABASE_URL + - name: JWT_SECRET + valueFrom: + secretKeyRef: + name: cas-secret + key: JWT_SECRET + - name: EXPO_ACCESS_TOKEN + valueFrom: + secretKeyRef: + name: cas-secret + key: EXPO_ACCESS_TOKEN + - name: ALLOWED_HOST + valueFrom: + configMapKeyRef: + name: cas-config + key: ALLOWED_HOST + ports: + - containerPort: 8000 + restartPolicy: Always -- cgit v1.2.3-18-g5258