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