Skip to content

Commit

Permalink
bump redis to 7.4.1 due to hostname support needed to prevent wrong c…
Browse files Browse the repository at this point in the history
…luster members after worker node restart
  • Loading branch information
thomschke committed Oct 27, 2024
1 parent d28c62e commit e4a1c59
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ data:
REDIS_ALLOW_REMOTE_CONNECTIONS: "yes"
REDIS_AOF_ENABLED: "{{ if .Values.config.aof.enabled }}yes{{ else }}no{{ end }}"
REDIS_CLUSTER_DYNAMIC_IPS: "yes"
REDIS_CLUSTER_PREFERRED_ENDPOINT_TYPE: "hostname"
REDIS_CLUSTER_REPLICAS: {{ .Values.config.cluster.replicas | quote }}
REDIS_CLUSTER_SLEEP_BEFORE_DNS_LOOKUP: {{ .Values.config.cluster.wait | quote }}
REDIS_NODES: '{{ range $i := until (include "edusharing_rediscluster.replicas" . | int) }}{{ include "edusharing_rediscluster.name" $ }}-{{ $i }}.{{ include "edusharing_rediscluster.name" $ }}-headless {{ end }}'
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,22 @@ spec:
- "-ec"
- |
cp /opt/bitnami/redis/etc/redis-default.conf /opt/bitnami/redis/etc/redis.conf
if [[ "${HOSTNAME##*-}" == "0" ]]; then
echo '# cluster-announce-hostname localhost' >> /opt/bitnami/redis/etc/redis.conf
echo '# cluster-preferred-endpoint-type hostname' >> /opt/bitnami/redis/etc/redis.conf
if [[ "${POD_NAME##*-}" == "0" ]]; then
export REDIS_CLUSTER_CREATOR="yes"
fi
export REDIS_CLUSTER_ANNOUNCE_HOSTNAME="$POD_NAME.{{ include "edusharing_rediscluster.name" $ }}-headless"
/opt/bitnami/scripts/redis-cluster/entrypoint.sh /opt/bitnami/scripts/redis-cluster/run.sh
env:
- name: REDIS_CLUSTER_ANNOUNCE_IP
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: status.podIP
fieldPath: metadata.name
envFrom:
- configMapRef:
name: {{ include "edusharing_rediscluster.name" . }}-env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
dockerio.mirror.docker.edu-sharing.com/bitnami/postgresql:${postgresql.version}
</docker.from.postgresql.server>
<docker.from.redis.exporter>
dockerio.mirror.docker.edu-sharing.com/bitnami/redis-exporter:1.45.0
dockerio.mirror.docker.edu-sharing.com/bitnami/redis-exporter:1.65.0
</docker.from.redis.exporter>
<docker.from.redis.server>
dockerio.mirror.docker.edu-sharing.com/bitnami/redis:6.2.7
dockerio.mirror.docker.edu-sharing.com/bitnami/redis:7.4.1
</docker.from.redis.server>
<docker.from.rediscluster.server>
dockerio.mirror.docker.edu-sharing.com/bitnami/redis-cluster:6.2.7
dockerio.mirror.docker.edu-sharing.com/bitnami/redis-cluster:7.4.1
</docker.from.rediscluster.server>
<!--suppress UnresolvedMavenProperty -->
<docker.from.tomcat>
Expand Down

0 comments on commit e4a1c59

Please sign in to comment.