2021-11-12 17:28:36 +00:00
|
|
|
image:
|
2023-11-17 10:18:43 +00:00
|
|
|
repository: bitnami/redis
|
2021-11-12 17:28:36 +00:00
|
|
|
pullPolicy: IfNotPresent
|
2024-02-24 14:24:57 +00:00
|
|
|
tag: 7.2.4@sha256:413ba6ab7104ced40c1047451680f0679b235684a14a7db4a05a5990ff4e1e67
|
2023-03-01 15:48:43 +00:00
|
|
|
workload:
|
|
|
|
main:
|
|
|
|
replicas: 1
|
|
|
|
type: StatefulSet
|
|
|
|
strategy: RollingUpdate
|
|
|
|
podSpec:
|
|
|
|
containers:
|
|
|
|
main:
|
|
|
|
env:
|
|
|
|
REDIS_REPLICATION_MODE: master
|
|
|
|
ALLOW_EMPTY_PASSWORD: "yes"
|
|
|
|
REDIS_PORT: "{{ .Values.service.main.ports.main.targetPort }}"
|
|
|
|
REDIS_PASSWORD:
|
|
|
|
secretKeyRef:
|
2023-03-05 17:15:26 +00:00
|
|
|
expandObjectName: "{{ if .Values.redisPassword }}true{{ else }}false{{ end }}"
|
|
|
|
name: '{{ if .Values.redisPassword }}credentials{{ else if .Values.existingSecret }}{{ .Values.existingSecret }}{{ else }}{{ printf "%s-%s" .Release.Name "rediscreds" }}{{ end }}'
|
2023-03-01 15:48:43 +00:00
|
|
|
key: "redis-password"
|
|
|
|
probes:
|
|
|
|
liveness:
|
|
|
|
enabled: true
|
2023-03-02 08:16:13 +00:00
|
|
|
type: exec
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- -c
|
|
|
|
- /health/ping_liveness_local.sh 2
|
2023-03-01 15:48:43 +00:00
|
|
|
readiness:
|
|
|
|
enabled: true
|
2023-03-02 08:16:13 +00:00
|
|
|
type: exec
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- -c
|
|
|
|
- /health/ping_readiness_local.sh 2
|
2023-03-01 15:48:43 +00:00
|
|
|
# -- Startup probe configuration
|
|
|
|
# @default -- See below
|
|
|
|
startup:
|
|
|
|
# -- Enable the startup probe
|
|
|
|
enabled: true
|
2023-03-02 08:16:13 +00:00
|
|
|
type: exec
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- -c
|
|
|
|
- /health/ping_readiness_local.sh 2
|
2023-03-01 15:48:43 +00:00
|
|
|
securityContext:
|
|
|
|
container:
|
|
|
|
readOnlyRootFilesystem: false
|
|
|
|
runAsGroup: 0
|
2022-06-07 17:41:19 +00:00
|
|
|
configmap:
|
|
|
|
health:
|
|
|
|
enabled: true
|
|
|
|
data:
|
|
|
|
ping_readiness_local.sh: |-
|
|
|
|
#!/bin/bash
|
|
|
|
[[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
|
|
|
|
response=$(
|
|
|
|
timeout -s 3 $1 \
|
|
|
|
redis-cli \
|
|
|
|
-h localhost \
|
|
|
|
-p $REDIS_PORT \
|
|
|
|
ping
|
|
|
|
)
|
|
|
|
if [ "$response" != "PONG" ]; then
|
|
|
|
echo "failed to connect using password: $REDIS_PASSWORD response: $response"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
ping_liveness_local.sh: |-
|
|
|
|
#!/bin/bash
|
|
|
|
[[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
|
|
|
|
response=$(
|
|
|
|
timeout -s 3 $1 \
|
|
|
|
redis-cli \
|
|
|
|
-h localhost \
|
|
|
|
-p $REDIS_PORT \
|
|
|
|
ping
|
|
|
|
)
|
|
|
|
if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
|
|
|
|
echo "$response"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
ping_readiness_master.sh: |-
|
|
|
|
#!/bin/bash
|
|
|
|
[[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
|
|
|
|
response=$(
|
|
|
|
timeout -s 3 $1 \
|
|
|
|
redis-cli \
|
|
|
|
-h $REDIS_MASTER_HOST \
|
|
|
|
-p $REDIS_MASTER_PORT_NUMBER \
|
|
|
|
ping
|
|
|
|
)
|
|
|
|
if [ "$response" != "PONG" ]; then
|
|
|
|
echo "$response"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
ping_liveness_master.sh: |-
|
|
|
|
#!/bin/bash
|
|
|
|
[[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
|
|
|
|
response=$(
|
|
|
|
timeout -s 3 $1 \
|
|
|
|
redis-cli \
|
|
|
|
-h $REDIS_MASTER_HOST \
|
|
|
|
-p $REDIS_MASTER_PORT_NUMBER \
|
|
|
|
ping
|
|
|
|
)
|
|
|
|
if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
|
|
|
|
echo "$response"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
ping_readiness_local_and_master.sh: |-
|
|
|
|
script_dir="$(dirname "$0")"
|
|
|
|
exit_status=0
|
|
|
|
"$script_dir/ping_readiness_local.sh" $1 || exit_status=$?
|
|
|
|
"$script_dir/ping_readiness_master.sh" $1 || exit_status=$?
|
|
|
|
exit $exit_status
|
|
|
|
ping_liveness_local_and_master.sh: |-
|
|
|
|
script_dir="$(dirname "$0")"
|
|
|
|
exit_status=0
|
|
|
|
"$script_dir/ping_liveness_local.sh" $1 || exit_status=$?
|
|
|
|
"$script_dir/ping_liveness_master.sh" $1 || exit_status=$?
|
|
|
|
exit $exit_status
|
|
|
|
secret:
|
|
|
|
credentials:
|
|
|
|
enabled: true
|
|
|
|
data:
|
|
|
|
redis-password: '{{ ( .Values.redisPassword | default "nothing" ) }}'
|
2023-03-05 17:15:26 +00:00
|
|
|
# -- Secret or password
|
|
|
|
# One of these options is required, unless used as a dependency for another TrueCharts chart.
|
2023-03-02 10:56:22 +00:00
|
|
|
redisPassword: ""
|
2022-06-07 17:41:19 +00:00
|
|
|
existingSecret: ""
|
2021-11-12 17:28:36 +00:00
|
|
|
service:
|
|
|
|
main:
|
|
|
|
ports:
|
|
|
|
main:
|
|
|
|
port: 6379
|
|
|
|
targetPort: 6379
|
|
|
|
volumeClaimTemplates:
|
2023-12-21 14:56:02 +00:00
|
|
|
data:
|
|
|
|
enabled: true
|
2024-03-07 10:56:11 +00:00
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
2023-12-21 14:56:02 +00:00
|
|
|
mountPath: "/bitnami/redis"
|
2023-12-24 19:27:28 +00:00
|
|
|
persistence:
|
2021-11-12 17:28:36 +00:00
|
|
|
redis-health:
|
|
|
|
enabled: true
|
2023-03-01 15:48:43 +00:00
|
|
|
type: configmap
|
|
|
|
objectName: health
|
2021-11-14 19:19:16 +00:00
|
|
|
mountPath: "/health"
|
2023-03-01 15:48:43 +00:00
|
|
|
defaultMode: "0755"
|
|
|
|
items:
|
|
|
|
- key: ping_readiness_local.sh
|
|
|
|
path: ping_readiness_local.sh
|
|
|
|
- key: ping_liveness_local.sh
|
|
|
|
path: ping_liveness_local.sh
|
|
|
|
- key: ping_readiness_master.sh
|
|
|
|
path: ping_readiness_master.sh
|
|
|
|
- key: ping_liveness_master.sh
|
|
|
|
path: ping_liveness_master.sh
|
|
|
|
- key: ping_liveness_local_and_master.sh
|
|
|
|
path: ping_liveness_local_and_master.sh
|
|
|
|
- key: ping_readiness_local_and_master.sh
|
|
|
|
path: ping_readiness_local_and_master.sh
|
2022-08-08 21:25:02 +00:00
|
|
|
portal:
|
2023-03-01 15:48:43 +00:00
|
|
|
open:
|
|
|
|
enabled: false
|
2023-03-01 22:24:09 +00:00
|
|
|
manifestManager:
|
2023-01-15 13:44:57 +00:00
|
|
|
enabled: false
|