[bitnami/redis] Allow use without cluster/sentinel (#3738)

* [bitnami/redis] Allow use without cluster/sentinel

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Add warning and deployment of standalone redis when using wrong value combination
This commit is contained in:
Francisco de Paz Galán
2020-09-23 10:45:30 +02:00
committed by GitHub
parent 923a446e55
commit 8ea9663cd4
3 changed files with 17 additions and 2 deletions

View File

@@ -20,6 +20,20 @@
{{- end }}
{{- end }}
{{- if and .Values.sentinel.enabled (not .Values.cluster.enabled)}}
-------------------------------------------------------------------------------
WARNING
Using redis sentinel without a cluster is not supported. A single pod with
standalone redis has been deployed.
To deploy redis sentinel, please use the values "cluster.enabled=true" and
"sentinel.enabled=true".
-------------------------------------------------------------------------------
{{- end }}
{{- if .Values.cluster.enabled }}
{{- if .Values.sentinel.enabled }}
Redis can be accessed via port {{ .Values.sentinel.service.redisPort }} on the following DNS name from within your cluster:

View File

@@ -284,7 +284,7 @@ data:
{{- else }}
exec redis-server "${ARGS[@]}"
{{- end }}
{{- if .Values.cluster.enabled }}
start-slave.sh: |
#!/bin/bash
{{- if (eq (.Values.securityContext.runAsUser | int) 0) }}
@@ -338,5 +338,6 @@ data:
{{- else }}
exec redis-server "${ARGS[@]}"
{{- end }}
{{- end }}
{{- end -}}

View File

@@ -1,4 +1,4 @@
{{- if and .Values.cluster.enabled (not .Values.sentinel.enabled) }}
{{- if or (not .Values.cluster.enabled) (not .Values.sentinel.enabled) }}
apiVersion: apps/v1
kind: StatefulSet
metadata: