From 57d50a239f1831ec9531d2a14136e805445b699b Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Sun, 5 Jun 2022 12:30:09 +0200 Subject: [PATCH] synapse: Convert to statefulset --- deploy/base/kustomization.yaml | 3 +-- deploy/base/pvc-synapse.yaml | 16 ---------------- ...loy-synapse.yaml => statefulset-synapse.yaml} | 12 +++++++++++- 3 files changed, 12 insertions(+), 19 deletions(-) delete mode 100644 deploy/base/pvc-synapse.yaml rename deploy/base/{deploy-synapse.yaml => statefulset-synapse.yaml} (90%) diff --git a/deploy/base/kustomization.yaml b/deploy/base/kustomization.yaml index 358a612..6eaa497 100644 --- a/deploy/base/kustomization.yaml +++ b/deploy/base/kustomization.yaml @@ -87,8 +87,7 @@ resources: - role-drone-runner.yaml - rolebinding-drone-runner.yaml -- pvc-synapse.yaml -- deploy-synapse.yaml +- statefulset-synapse.yaml - svc-synapse.yaml configMapGenerator: diff --git a/deploy/base/pvc-synapse.yaml b/deploy/base/pvc-synapse.yaml deleted file mode 100644 index cdffdfb..0000000 --- a/deploy/base/pvc-synapse.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: synapse-data - namespace: default - labels: - app: synapse - component: storage - app.kubernetes.io/name: synapse -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi diff --git a/deploy/base/deploy-synapse.yaml b/deploy/base/statefulset-synapse.yaml similarity index 90% rename from deploy/base/deploy-synapse.yaml rename to deploy/base/statefulset-synapse.yaml index e268cc9..1add9a9 100644 --- a/deploy/base/deploy-synapse.yaml +++ b/deploy/base/statefulset-synapse.yaml @@ -1,5 +1,5 @@ apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: synapse labels: @@ -8,6 +8,7 @@ metadata: app.kubernetes.io/name: synapse app.kubernetes.io/instance: synapse spec: + serviceName: synapse selector: matchLabels: app: synapse @@ -76,3 +77,12 @@ spec: secret: secretName: synapse-config defaultMode: 0600 + volumeClaimTemplates: + - metadata: + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi