diff --git a/charts/matrix-stack/templates/redis/redis_service.yaml b/charts/matrix-stack/templates/redis/redis_service.yaml index 6d89d9f6a..877420608 100644 --- a/charts/matrix-stack/templates/redis/redis_service.yaml +++ b/charts/matrix-stack/templates/redis/redis_service.yaml @@ -15,6 +15,7 @@ metadata: namespace: {{ $.Release.Namespace }} spec: type: ClusterIP + clusterIP: None ipFamilyPolicy: PreferDualStack ports: - port: 6379 diff --git a/charts/matrix-stack/templates/redis/redis_deployment.yaml b/charts/matrix-stack/templates/redis/redis_statefulset.yaml similarity index 96% rename from charts/matrix-stack/templates/redis/redis_deployment.yaml rename to charts/matrix-stack/templates/redis/redis_statefulset.yaml index 9cb581b0c..ea9517ebf 100644 --- a/charts/matrix-stack/templates/redis/redis_deployment.yaml +++ b/charts/matrix-stack/templates/redis/redis_statefulset.yaml @@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{- if (include "element-io.redis.internalRedisEnabled" (dict "root" $)) -}} {{- with $.Values.redis -}} apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: {{- with .annotations }} annotations: @@ -19,7 +19,7 @@ metadata: name: {{ $.Release.Name }}-redis namespace: {{ $.Release.Namespace }} spec: - {{ include "element-io.ess-library.workloads.commonSpec" (dict "root" $ "context" (dict "nameSuffix" "redis" "kind" "Deployment" "componentValues" .)) | nindent 2 }} + {{ include "element-io.ess-library.workloads.commonSpec" (dict "root" $ "context" (dict "nameSuffix" "redis" "kind" "StatefulSet" "componentValues" .)) | nindent 2 }} template: metadata: labels: @@ -30,7 +30,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: -{{- include "element-io.ess-library.pods.commonSpec" (dict "root" $ "context" (dict "componentValues" . "instanceSuffix" "redis" "kind" "Deployment")) | nindent 6 }} +{{- include "element-io.ess-library.pods.commonSpec" (dict "root" $ "context" (dict "componentValues" . "instanceSuffix" "redis" "kind" "StatefulSet")) | nindent 6 }} {{- with .extraInitContainers }} initContainers: {{- toYaml . | nindent 6 }} diff --git a/newsfragments/1368.changed.md b/newsfragments/1368.changed.md new file mode 100644 index 000000000..75b570220 --- /dev/null +++ b/newsfragments/1368.changed.md @@ -0,0 +1 @@ +Change Redis from a `Deployment` to a `StatefulSet`.