diff --git a/charts/redis/Chart.yaml b/charts/redis/Chart.yaml index 485009a4..b9ab1b8f 100644 --- a/charts/redis/Chart.yaml +++ b/charts/redis/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: redis -version: 0.1.3 +version: 0.1.4 description: Simple single-server Redis deployment with configurable storage sources: - https://github.com/lsst-sqre/charts/tree/master/charts/redis diff --git a/charts/redis/templates/statefulset.yaml b/charts/redis/templates/statefulset.yaml index 65bcb41a..eab2efbb 100644 --- a/charts/redis/templates/statefulset.yaml +++ b/charts/redis/templates/statefulset.yaml @@ -24,8 +24,10 @@ spec: - name: "redis" args: - "redis-server" + {{- if .Values.persistence.enabled }} - "--appendonly" - "yes" + {{- end }} {{- if (and .Values.config.secretName .Values.config.secretKey) }} - "--requirepass" - "$(REDIS_PASSWORD)" @@ -70,11 +72,11 @@ spec: runAsGroup: 999 {{- if (not .Values.persistence.enabled) }} volumes: - - name: {{ template "redis.fullname" . }} + - name: "storage" emptyDir: {} {{- else if .Values.persistence.volumeClaimName }} volumes: - - name: {{ template "redis.fullname" . }} + - name: "storage" persistentVolumeClaim: claimName: {{ .Values.persistence.volumeClaimName | quote }} {{- end }}