Let's try to deploy it now.

This commit is contained in:
Alex Belanger 2024-03-08 22:47:42 -05:00
parent 4969cf00ab
commit 3b023f34be
No known key found for this signature in database
GPG Key ID: 31736D2B10A5F158
2 changed files with 56 additions and 2 deletions

View File

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

48
k8s/deployment.yaml Normal file
View File

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