mirror of
https://github.com/bitnami/charts.git
synced 2026-08-10 14:15:55 +08:00
* [bitnami/redis-cluster] Add TLS support to Redis-Cluster Signed-off-by: joancafom <jcarmona@bitnami.com> * [bitnami/redis-cluster] Update components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Co-authored-by: Bitnami Containers <containers@bitnami.com>
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ include "redis-cluster.fullname" . }}-scripts
|
|
labels: {{- include "redis-cluster.labels" . | nindent 4 }}
|
|
data:
|
|
ping_readiness_local.sh: |-
|
|
{{- if .Values.usePasswordFile }}
|
|
password_aux=`cat ${REDIS_PASSWORD_FILE}`
|
|
export REDISCLI_AUTH=$password_aux
|
|
{{- else }}
|
|
export REDISCLI_AUTH=$REDIS_PASSWORD
|
|
{{- end }}
|
|
response=$(
|
|
timeout -s 9 $1 \
|
|
redis-cli \
|
|
-h localhost \
|
|
{{- if .Values.tls.enabled }}
|
|
-p $REDIS_TLS_PORT \
|
|
--tls \
|
|
--cert {{ template "redis-cluster.tlsCert" . }} \
|
|
--key {{ template "redis-cluster.tlsCertKey" . }} \
|
|
--cacert {{ template "redis-cluster.tlsCACert" . }} \
|
|
{{- else }}
|
|
-p $REDIS_PORT \
|
|
{{- end }}
|
|
ping
|
|
)
|
|
if [ "$response" != "PONG" ]; then
|
|
echo "$response"
|
|
exit 1
|
|
fi
|
|
ping_liveness_local.sh: |-
|
|
{{- if .Values.usePasswordFile }}
|
|
password_aux=`cat ${REDIS_PASSWORD_FILE}`
|
|
export REDISCLI_AUTH=$password_aux
|
|
{{- else }}
|
|
export REDISCLI_AUTH=$REDIS_PASSWORD
|
|
{{- end }}
|
|
response=$(
|
|
timeout -s 9 $1 \
|
|
redis-cli \
|
|
-h localhost \
|
|
{{- if .Values.tls.enabled }}
|
|
-p $REDIS_TLS_PORT \
|
|
--tls \
|
|
--cert {{ template "redis-cluster.tlsCert" . }} \
|
|
--key {{ template "redis-cluster.tlsCertKey" . }} \
|
|
--cacert {{ template "redis-cluster.tlsCACert" . }} \
|
|
{{- else }}
|
|
-p $REDIS_PORT \
|
|
{{- end }}
|
|
ping
|
|
)
|
|
if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
|
|
echo "$response"
|
|
exit 1
|
|
fi
|