diff --git a/.github/workflows/cantdidnt.yaml b/.github/workflows/candide.yaml similarity index 88% rename from .github/workflows/cantdidnt.yaml rename to .github/workflows/candide.yaml index 8884d928..d1ee0f16 100644 --- a/.github/workflows/cantdidnt.yaml +++ b/.github/workflows/candide.yaml @@ -1,4 +1,4 @@ -name: Deploy cantdidnt for Libera +name: Deploy candide for Libera on: push: @@ -10,8 +10,9 @@ env: GKE_CLUSTER: pragma GKE_ZONE: us-central1-c DEPLOYMENT_NAME: candide + NAMESPACE: candide REPOSITORY: pbot - IMAGE: candide + IMAGE: pbot jobs: build-deploy-gke-prod: @@ -75,3 +76,8 @@ jobs: # ./kustomize build . | kubectl apply -f - # kubectl rollout status deployment/$DEPLOYMENT_NAME # kubectl get services -o wide + + - name: Deploy image + run: |- + sed -i -e 's/IMAGE_PLACEHOLDER/'$PROJECT_ID/$REPOSITORY/$IMAGE:${{ github.sha }}'/' k8s/deployment.yaml + kubectl apply -f k8s/deployment.yaml \ No newline at end of file diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml new file mode 100644 index 00000000..7682fc42 --- /dev/null +++ b/k8s/deployment.yaml @@ -0,0 +1,48 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: candide + namespace: candide + labels: + app: candide +spec: + selector: + matchLabels: + app: candide + replicas: 1 + strategy: + type: Recreate + template: + metadata: + labels: + app: candide + spec: + containers: + - name: candide + image: IMAGE_PLACEHOLDER + volumeMounts: + - mountPath: /mnt/persistent + name: persistent + resources: + requests: + cpu: "0.1" + memory: 100Mi + limits: + cpu: "0.5" + memory: 500Mi + volumes: + - name: persistent + persistentVolumeClaim: + claimName: candide-storage +--- +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: candide-storage + namespace: candide +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi