Skip to content

Commit

Permalink
update ceramic k8s config
Browse files Browse the repository at this point in the history
  • Loading branch information
hubsmoke committed Sep 10, 2024
1 parent 5ef14dc commit 7d132ae
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-ceramic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
53 changes: 49 additions & 4 deletions ceramic-k8s/ceramic_deployment_prod.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -11,10 +43,7 @@ spec:
matchLabels:
App: JsCeramicProd
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
type: Recreate
template:
metadata:
annotations:
Expand All @@ -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:
Expand All @@ -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"
---
Expand Down

0 comments on commit 7d132ae

Please sign in to comment.