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-01-12 08:49:40 -05:00
|
|
|
tag: 7.0.7@sha256:aece92d54cff3a5b984bc114165643898aed87b504e2bb6d19eaefb25082fff1
|
2021-11-12 12:28:36 -05:00
|
|
|
|
|
|
|
controller:
|
|
|
|
# -- Set the controller type.
|
|
|
|
# Valid options are deployment, daemonset or statefulset
|
|
|
|
type: statefulset
|
|
|
|
# -- Number of desired pods
|
|
|
|
replicas: 1
|
|
|
|
# -- Set the controller upgrade strategy
|
|
|
|
# For Deployments, valid values are Recreate (default) and RollingUpdate.
|
|
|
|
# For StatefulSets, valid values are OnDelete and RollingUpdate (default).
|
|
|
|
# DaemonSets ignore this.
|
|
|
|
strategy: RollingUpdate
|
|
|
|
rollingUpdate:
|
|
|
|
# -- Set deployment RollingUpdate max unavailable
|
|
|
|
unavailable: 1
|
|
|
|
# -- Set deployment RollingUpdate max surge
|
|
|
|
surge:
|
|
|
|
# -- Set statefulset RollingUpdate partition
|
|
|
|
partition:
|
|
|
|
# -- ReplicaSet revision history limit
|
|
|
|
revisionHistoryLimit: 3
|
|
|
|
|
|
|
|
securityContext:
|
|
|
|
readOnlyRootFilesystem: false
|
|
|
|
|
|
|
|
podSecurityContext:
|
|
|
|
runAsGroup: 0
|
|
|
|
|
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
|
|
|
|
2022-06-07 13:41:19 -04:00
|
|
|
env:
|
|
|
|
REDIS_REPLICATION_MODE: master
|
|
|
|
ALLOW_EMPTY_PASSWORD: "yes"
|
|
|
|
REDIS_PORT: "{{ .Values.service.main.ports.main.targetPort }}"
|
2021-11-12 12:28:36 -05:00
|
|
|
REDIS_PASSWORD:
|
|
|
|
secretKeyRef:
|
2022-06-07 13:41:19 -04:00
|
|
|
name: '{{ .Values.existingSecret | default ( printf "%s-credentials" ( include "tc.common.names.fullname" . ) ) }}'
|
2021-11-12 12:28:36 -05:00
|
|
|
key: "redis-password"
|
|
|
|
|
2022-06-07 13:41:19 -04:00
|
|
|
redisPassword: "testpass"
|
|
|
|
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
|
|
|
|
|
|
|
# -- Probe configuration
|
|
|
|
# -- [[ref]](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
|
|
|
|
# @default -- See below
|
|
|
|
probes:
|
|
|
|
# -- Liveness probe configuration
|
|
|
|
# @default -- See below
|
|
|
|
liveness:
|
|
|
|
# -- Enable the liveness probe
|
|
|
|
enabled: true
|
|
|
|
# -- Set this to `true` if you wish to specify your own livenessProbe
|
|
|
|
custom: true
|
|
|
|
# -- The spec field contains the values for the default livenessProbe.
|
|
|
|
# If you selected `custom: true`, this field holds the definition of the livenessProbe.
|
|
|
|
# @default -- See below
|
|
|
|
spec:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- -c
|
|
|
|
- /health/ping_liveness_local.sh 2
|
|
|
|
|
|
|
|
# -- Redainess probe configuration
|
|
|
|
# @default -- See below
|
|
|
|
readiness:
|
|
|
|
# -- Enable the readiness probe
|
|
|
|
enabled: true
|
|
|
|
# -- Set this to `true` if you wish to specify your own readinessProbe
|
|
|
|
custom: true
|
|
|
|
# -- The spec field contains the values for the default readinessProbe.
|
|
|
|
# If you selected `custom: true`, this field holds the definition of the readinessProbe.
|
|
|
|
# @default -- See below
|
|
|
|
spec:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- -c
|
|
|
|
- /health/ping_readiness_local.sh 2
|
|
|
|
# -- Startup probe configuration
|
|
|
|
# @default -- See below
|
|
|
|
startup:
|
|
|
|
# -- Enable the startup probe
|
|
|
|
enabled: true
|
|
|
|
custom: true
|
|
|
|
# -- The spec field contains the values for the default livenessProbe.
|
|
|
|
# If you selected `custom: true`, this field holds the definition of the livenessProbe.
|
|
|
|
# @default -- See below
|
|
|
|
spec:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- -c
|
|
|
|
- /health/ping_readiness_local.sh 2
|
|
|
|
|
|
|
|
persistence:
|
|
|
|
# -- redis-health configmap mount
|
|
|
|
# @default -- See below
|
|
|
|
redis-health:
|
|
|
|
enabled: true
|
|
|
|
type: custom
|
|
|
|
# -- Where to mount the volume in the main container.
|
|
|
|
# Defaults to `/<name_of_the_volume>`,
|
|
|
|
# setting to '-' creates the volume but disables the volumeMount.
|
2021-11-14 14:19:16 -05:00
|
|
|
mountPath: "/health"
|
2021-11-12 12:28:36 -05:00
|
|
|
# -- Specify if the volume should be mounted read-only.
|
|
|
|
readOnly: false
|
|
|
|
# -- Define the custom Volume spec here
|
|
|
|
# [[ref]](https://kubernetes.io/docs/concepts/storage/volumes/)
|
|
|
|
volumeSpec:
|
|
|
|
configMap:
|
|
|
|
defaultMode: 0755
|
2022-06-07 13:41:19 -04:00
|
|
|
name: '{{ include "tc.common.names.fullname" . }}-health'
|
2022-08-08 17:25:02 -04:00
|
|
|
|
|
|
|
portal:
|
|
|
|
enabled: false
|