2021-11-12 12:28:36 -05:00
|
|
|
image:
|
2022-07-20 04:54:37 -04:00
|
|
|
repository: tccr.io/truecharts/redis
|
2021-11-12 12:28:36 -05:00
|
|
|
pullPolicy: IfNotPresent
|
2023-02-26 17:02:13 -05:00
|
|
|
tag: 7.0.8@sha256:13e0bbf5369ed2f219b96c0e7136b531eb1fdca1db7b7e2c72e13133adf26288
|
2021-11-12 12:28:36 -05:00
|
|
|
|
2023-03-01 10:48:43 -05: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-02 05:53:29 -05:00
|
|
|
expandObjectName: false
|
2023-03-02 05:56:22 -05:00
|
|
|
name: '{{ if .Values.redisPassword }}"credentials"{{ else if .Values.existingSecret }}{{ .Values.existingSecret }}{{ else }}{{ printf "%s-%s" .Release.Name "rediscreds" }}{{ end }}'
|
2023-03-01 10:48:43 -05:00
|
|
|
key: "redis-password"
|
|
|
|
probes:
|
|
|
|
liveness:
|
|
|
|
enabled: true
|
2023-03-02 03:16:13 -05:00
|
|
|
type: exec
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- -c
|
|
|
|
- /health/ping_liveness_local.sh 2
|
2023-03-01 10:48:43 -05:00
|
|
|
readiness:
|
|
|
|
enabled: true
|
2023-03-02 03:16:13 -05:00
|
|
|
type: exec
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- -c
|
|
|
|
- /health/ping_readiness_local.sh 2
|
2023-03-01 10:48:43 -05:00
|
|
|
# -- Startup probe configuration
|
|
|
|
# @default -- See below
|
|
|
|
startup:
|
|
|
|
# -- Enable the startup probe
|
|
|
|
enabled: true
|
2023-03-02 03:16:13 -05:00
|
|
|
type: exec
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- -c
|
|
|
|
- /health/ping_readiness_local.sh 2
|
2021-11-12 12:28:36 -05:00
|
|
|
|
2023-03-01 10:48:43 -05:00
|
|
|
securityContext:
|
|
|
|
container:
|
|
|
|
readOnlyRootFilesystem: false
|
|
|
|
runAsGroup: 0
|
2021-11-12 12:28:36 -05:00
|
|
|
|
2022-06-07 13:41:19 -04: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
|
2021-11-12 12:28:36 -05:00
|
|
|
|
2022-06-07 13:41:19 -04:00
|
|
|
secret:
|
|
|
|
credentials:
|
|
|
|
enabled: true
|
|
|
|
data:
|
|
|
|
redis-password: '{{ ( .Values.redisPassword | default "nothing" ) }}'
|
2021-11-12 12:28:36 -05:00
|
|
|
|
2023-03-02 05:56:22 -05:00
|
|
|
redisPassword: ""
|
2022-06-07 13:41:19 -04:00
|
|
|
existingSecret: ""
|
|
|
|
|
2021-11-12 12:28:36 -05:00
|
|
|
service:
|
|
|
|
main:
|
|
|
|
ports:
|
|
|
|
main:
|
|
|
|
port: 6379
|
|
|
|
targetPort: 6379
|
|
|
|
|
|
|
|
volumeClaimTemplates:
|
|
|
|
data:
|
|
|
|
enabled: true
|
2021-12-05 06:37:24 -05:00
|
|
|
mountPath: "/bitnami/redis"
|
2021-11-12 12:28:36 -05:00
|
|
|
|
|
|
|
persistence:
|
|
|
|
redis-health:
|
|
|
|
enabled: true
|
2023-03-01 10:48:43 -05:00
|
|
|
type: configmap
|
|
|
|
objectName: health
|
2021-11-14 14:19:16 -05:00
|
|
|
mountPath: "/health"
|
2023-03-01 10:48:43 -05: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 17:25:02 -04:00
|
|
|
|
|
|
|
portal:
|
2023-03-01 10:48:43 -05:00
|
|
|
open:
|
|
|
|
enabled: false
|
2023-01-15 08:44:57 -05:00
|
|
|
|
2023-03-01 17:24:09 -05:00
|
|
|
manifestManager:
|
2023-01-15 08:44:57 -05:00
|
|
|
enabled: false
|