diff --git a/.github/workflows/deploy-ceramic.yaml b/.github/workflows/deploy-ceramic.yaml index 1c6591b6..44d15b50 100644 --- a/.github/workflows/deploy-ceramic.yaml +++ b/.github/workflows/deploy-ceramic.yaml @@ -48,7 +48,7 @@ jobs: - name: Deploy to EKS (PROD) if: github.ref == 'refs/heads/main' run: | - kubectl apply -f ceramic-k8s/ceramic_deployment_dev.yaml + kubectl apply -f ceramic-k8s/ceramic_deployment_prod.yaml - name: Verify EKS Deployment (DEV) if: github.ref == 'refs/heads/develop' diff --git a/ceramic-k8s/ceramic_deployment_prod.yaml b/ceramic-k8s/ceramic_deployment_prod.yaml index 93fc5f4a..376b6a0d 100644 --- a/ceramic-k8s/ceramic_deployment_prod.yaml +++ b/ceramic-k8s/ceramic_deployment_prod.yaml @@ -1,3 +1,35 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: ceramic-prod-persistent-storage +spec: + capacity: + storage: 100Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: manual + awsElasticBlockStore: + volumeID: "vol-0d7ba145f0248e211" + fsType: ext4 + +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: ceramic-prod-persistent-storage-pvc + labels: + App: JsCeramicProd +spec: + storageClassName: manual + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Gi + +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -11,10 +43,7 @@ spec: matchLabels: App: JsCeramicProd strategy: - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% - type: RollingUpdate + type: Recreate template: metadata: annotations: @@ -36,6 +65,9 @@ spec: - image: ceramicnetwork/js-ceramic:5.16.0 name: js-ceramic-prod command: ["/bin/bash", "-c"] + volumeMounts: + - name: ceramic-prod-persistent-storage + mountPath: /root/.ceramic args: - echo "SOURCING ENV"; source /vault/secrets/config; ./packages/cli/bin/ceramic.js daemon --config daemon.config.json; ports: @@ -62,6 +94,19 @@ spec: port: http-api failureThreshold: 60 periodSeconds: 1 + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: topology.kubernetes.io/zone + operator: In + values: + - us-east-2c + volumes: + - name: ceramic-prod-persistent-storage + persistentVolumeClaim: + claimName: ceramic-prod-persistent-storage-pvc serviceAccountName: "vault-auth" ---