From c4b5bc763c0ebb0456601a59efa7f1de31486328 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Thu, 5 Oct 2023 19:08:30 +0530 Subject: [PATCH 1/5] space Signed-off-by: Shubham Gupta --- charts/redis-cluster/templates/redis-cluster.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/redis-cluster/templates/redis-cluster.yaml b/charts/redis-cluster/templates/redis-cluster.yaml index 615d4787..ccbfb12e 100644 --- a/charts/redis-cluster/templates/redis-cluster.yaml +++ b/charts/redis-cluster/templates/redis-cluster.yaml @@ -10,14 +10,14 @@ spec: clusterVersion: {{ .Values.redisCluster.clusterVersion }} redisLeader: {{- include "redis.role" .Values.redisCluster.leader | nindent 4 }} - replicas: {{ .Values.redisCluster.leader.replicas}} + replicas: {{ .Values.redisCluster.leader.replicas }} {{- if .Values.externalConfig.enabled }} redisConfig: additionalRedisConfig: "{{ .Release.Name }}-ext-config" {{- end }} redisFollower: {{- include "redis.role" .Values.redisCluster.follower | nindent 4 }} - replicas: {{ .Values.redisCluster.follower.replicas}} + replicas: {{ .Values.redisCluster.follower.replicas }} {{- if .Values.externalConfig.enabled }} redisConfig: additionalRedisConfig: "{{ .Release.Name }}-ext-config" From b1a490abf742e7a23bbdcc8daf520431946b4064 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Thu, 5 Oct 2023 19:12:10 +0530 Subject: [PATCH 2/5] fix name Signed-off-by: Shubham Gupta --- charts/redis-cluster/templates/_helpers.tpl | 2 +- charts/redis-cluster/values.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/redis-cluster/templates/_helpers.tpl b/charts/redis-cluster/templates/_helpers.tpl index 7ca79dbd..132e78da 100644 --- a/charts/redis-cluster/templates/_helpers.tpl +++ b/charts/redis-cluster/templates/_helpers.tpl @@ -29,7 +29,7 @@ pdb: {{- end }} {{- if .nodeSelector }} nodeSelector: - {{- toYaml .nodeSelector | nindent 4 }} + {{- toYaml .nodeSelector | nindent 2 }} {{- end }} {{- end -}} diff --git a/charts/redis-cluster/values.yaml b/charts/redis-cluster/values.yaml index 320dbc00..b268ceb3 100644 --- a/charts/redis-cluster/values.yaml +++ b/charts/redis-cluster/values.yaml @@ -41,7 +41,7 @@ redisCluster: pdb: enabled: false maxUnavailable: 1 - minUnavailable: 1 + minAvailable: 1 follower: replicas: 3 @@ -66,7 +66,7 @@ redisCluster: pdb: enabled: false maxUnavailable: 1 - minUnavailable: 1 + minAvailable: 1 labels: {} # foo: bar From e0bdcb9bce80d2502ec48f330f8fca4457b2f8ec Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Thu, 5 Oct 2023 19:16:23 +0530 Subject: [PATCH 3/5] fix lint Signed-off-by: Shubham Gupta --- charts/redis-cluster/templates/_helpers.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/redis-cluster/templates/_helpers.tpl b/charts/redis-cluster/templates/_helpers.tpl index 132e78da..c30bb7c6 100644 --- a/charts/redis-cluster/templates/_helpers.tpl +++ b/charts/redis-cluster/templates/_helpers.tpl @@ -23,9 +23,9 @@ affinity: {{- end }} {{- if .pdb.enabled }} pdb: - enabled: "{{ .pdb.enabled | quote }}" + enabled: {{ .pdb.enabled }} maxUnavailable: {{ .pdb.maxUnavailable }} - minAvailable: {{ .pdb.minUnavailable }} + minAvailable: {{ .pdb.minAvailable }} {{- end }} {{- if .nodeSelector }} nodeSelector: From d9890b0dd1e517379e9561d8735db24bb4223235 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Thu, 5 Oct 2023 21:01:27 +0530 Subject: [PATCH 4/5] fix helpers.tpl Signed-off-by: Shubham Gupta --- charts/redis-cluster/templates/_helpers.tpl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/charts/redis-cluster/templates/_helpers.tpl b/charts/redis-cluster/templates/_helpers.tpl index c30bb7c6..cb9c07a7 100644 --- a/charts/redis-cluster/templates/_helpers.tpl +++ b/charts/redis-cluster/templates/_helpers.tpl @@ -17,9 +17,13 @@ app.kubernetes.io/component: middleware {{/* Helper for Redis Cluster (leader & follower) */}} {{- define "redis.role" -}} -{{- with .affinity }} +{{- if .affinity }} affinity: - {{- toYaml . | nindent 4 }} + {{- toYaml .affinity | nindent 2 }} +{{- end }} +{{- if .tolerations }} +tolerations: + {{- toYaml .tolerations | nindent 2 }} {{- end }} {{- if .pdb.enabled }} pdb: @@ -31,6 +35,10 @@ pdb: nodeSelector: {{- toYaml .nodeSelector | nindent 2 }} {{- end }} +{{- if .securityContext }} +securityContext: + {{- toYaml .securityContext | nindent 2 }} +{{- end }} {{- end -}} {{/* Generate sidecar properties */}} From ead984811a695f72ae1b8a61e6ea939a2e4bbbd1 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Thu, 5 Oct 2023 21:01:55 +0530 Subject: [PATCH 5/5] bump version Signed-off-by: Shubham Gupta --- charts/redis-cluster/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redis-cluster/Chart.yaml b/charts/redis-cluster/Chart.yaml index fc0f16f2..c6c920c5 100644 --- a/charts/redis-cluster/Chart.yaml +++ b/charts/redis-cluster/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: redis-cluster description: Provides easy redis setup definitions for Kubernetes services, and deployment. -version: 0.15.7 +version: 0.15.8 appVersion: "0.15.1" home: https://github.com/ot-container-kit/redis-operator sources: