Skip to content

Commit d7becb2

Browse files
committed
Change Redis to be a StatefulSet
1 parent ce163d2 commit d7becb2

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

charts/matrix-stack/templates/redis/redis_service.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ metadata:
1515
namespace: {{ $.Release.Namespace }}
1616
spec:
1717
type: ClusterIP
18+
clusterIP: None
1819
ipFamilyPolicy: PreferDualStack
1920
ports:
2021
- port: 6379

charts/matrix-stack/templates/redis/redis_deployment.yaml renamed to charts/matrix-stack/templates/redis/redis_statefulset.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only
77
{{- if (include "element-io.redis.internalRedisEnabled" (dict "root" $)) -}}
88
{{- with $.Values.redis -}}
99
apiVersion: apps/v1
10-
kind: Deployment
10+
kind: StatefulSet
1111
metadata:
1212
{{- with .annotations }}
1313
annotations:
@@ -19,7 +19,7 @@ metadata:
1919
name: {{ $.Release.Name }}-redis
2020
namespace: {{ $.Release.Namespace }}
2121
spec:
22-
{{ include "element-io.ess-library.workloads.commonSpec" (dict "root" $ "context" (dict "nameSuffix" "redis" "kind" "Deployment" "componentValues" .)) | nindent 2 }}
22+
{{ include "element-io.ess-library.workloads.commonSpec" (dict "root" $ "context" (dict "nameSuffix" "redis" "kind" "StatefulSet" "componentValues" .)) | nindent 2 }}
2323
template:
2424
metadata:
2525
labels:
@@ -30,7 +30,7 @@ spec:
3030
{{- toYaml . | nindent 8 }}
3131
{{- end }}
3232
spec:
33-
{{- include "element-io.ess-library.pods.commonSpec" (dict "root" $ "context" (dict "componentValues" . "instanceSuffix" "redis" "kind" "Deployment")) | nindent 6 }}
33+
{{- include "element-io.ess-library.pods.commonSpec" (dict "root" $ "context" (dict "componentValues" . "instanceSuffix" "redis" "kind" "StatefulSet")) | nindent 6 }}
3434
{{- with .extraInitContainers }}
3535
initContainers:
3636
{{- toYaml . | nindent 6 }}

newsfragments/1368.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Change Redis from a `Deployment` to a `StatefulSet`.

0 commit comments

Comments
 (0)