Skip to content

Commit

Permalink
[ Fix ] : Redis Cluster Chart (#152)
Browse files Browse the repository at this point in the history
* space

Signed-off-by: Shubham Gupta <[email protected]>

* fix name

Signed-off-by: Shubham Gupta <[email protected]>

* fix lint

Signed-off-by: Shubham Gupta <[email protected]>

* fix helpers.tpl

Signed-off-by: Shubham Gupta <[email protected]>

* bump version

Signed-off-by: Shubham Gupta <[email protected]>

---------

Signed-off-by: Shubham Gupta <[email protected]>
  • Loading branch information
shubham-cmyk authored Oct 10, 2023
1 parent 55f12b4 commit a459132
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/redis-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
18 changes: 13 additions & 5 deletions charts/redis-cluster/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,27 @@ 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:
enabled: "{{ .pdb.enabled | quote }}"
enabled: {{ .pdb.enabled }}
maxUnavailable: {{ .pdb.maxUnavailable }}
minAvailable: {{ .pdb.minUnavailable }}
minAvailable: {{ .pdb.minAvailable }}
{{- end }}
{{- if .nodeSelector }}
nodeSelector:
{{- toYaml .nodeSelector | nindent 4 }}
{{- toYaml .nodeSelector | nindent 2 }}
{{- end }}
{{- if .securityContext }}
securityContext:
{{- toYaml .securityContext | nindent 2 }}
{{- end }}
{{- end -}}

Expand Down
4 changes: 2 additions & 2 deletions charts/redis-cluster/templates/redis-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions charts/redis-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ redisCluster:
pdb:
enabled: false
maxUnavailable: 1
minUnavailable: 1
minAvailable: 1

follower:
replicas: 3
Expand All @@ -66,7 +66,7 @@ redisCluster:
pdb:
enabled: false
maxUnavailable: 1
minUnavailable: 1
minAvailable: 1

labels: {}
# foo: bar
Expand Down

0 comments on commit a459132

Please sign in to comment.