From a2759ae0e4136326686e390d4ebaa8a4d5266ffa Mon Sep 17 00:00:00 2001 From: itzaname Date: Sat, 18 Jun 2022 03:37:28 -0400 Subject: [PATCH] Use statefulset and persistent storage --- .../templates/{deployment.yaml => statefulset.yaml} | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) rename chart/templates/{deployment.yaml => statefulset.yaml} (88%) diff --git a/chart/templates/deployment.yaml b/chart/templates/statefulset.yaml similarity index 88% rename from chart/templates/deployment.yaml rename to chart/templates/statefulset.yaml index ba8dff3..5901dbc 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/statefulset.yaml @@ -1,5 +1,5 @@ apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: {{ include "maptest-bot.fullname" . }} labels: @@ -11,6 +11,15 @@ spec: selector: matchLabels: {{- include "maptest-bot.selectorLabels" . | nindent 6 }} + serviceName: {{ include "maptest-bot.fullname" . }} + volumeClaimTemplates: + - metadata: + name: map-submits + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 1Gi template: metadata: {{- with .Values.podAnnotations }} @@ -40,6 +49,8 @@ spec: - name: config mountPath: "/app/config" readOnly: true + - name: map-submits + mountPath: "/app/files" initContainers: - name: {{ .Chart.Name }}-init securityContext: