generated from onedr0p/cluster-template
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(container): update image redis to v19.2.0 #350
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- HelmRelease: database/redis ConfigMap: database/redis-scripts
+++ HelmRelease: database/redis ConfigMap: database/redis-scripts
@@ -154,82 +154,157 @@
ARGS+=("--replicaof" "${REDIS_MASTER_HOST}" "${REDIS_MASTER_PORT_NUMBER}")
fi
ARGS+=("--protected-mode" "no")
ARGS+=("--include" "/opt/bitnami/redis/etc/replica.conf")
ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf")
exec redis-server "${ARGS[@]}"
- start-sentinel.sh: "#!/bin/bash\n\n. /opt/bitnami/scripts/libos.sh\n. /opt/bitnami/scripts/libvalidations.sh\n\
- . /opt/bitnami/scripts/libfile.sh\n\nHEADLESS_SERVICE=\"redis-headless.database.svc.cluster.local\"\
- \nREDIS_SERVICE=\"redis.database.svc.cluster.local\"\n\nget_port() {\n hostname=\"\
- $1\"\n type=\"$2\"\n\n port_var=$(echo \"${hostname^^}_SERVICE_PORT_$type\"\
- \ | sed \"s/-/_/g\")\n port=${!port_var}\n\n if [ -z \"$port\" ]; then\n\
- \ case $type in\n \"SENTINEL\")\n echo 26379\n\
- \ ;;\n \"REDIS\")\n echo 6379\n \
- \ ;;\n esac\n else\n echo $port\n fi\n}\n\nget_full_hostname()\
- \ {\n hostname=\"$1\"\n full_hostname=\"${hostname}.${HEADLESS_SERVICE}\"\
- \n echo \"${full_hostname}\"\n}\n\nSERVPORT=$(get_port \"$HOSTNAME\" \"SENTINEL\"\
- )\nREDISPORT=$(get_port \"$HOSTNAME\" \"REDIS\")\nSENTINEL_SERVICE_PORT=$(get_port\
- \ \"redis\" \"SENTINEL\")\n\nsentinel_conf_set() {\n local -r key=\"${1:?missing\
- \ key}\"\n local value=\"${2:-}\"\n\n # Sanitize inputs\n value=\"${value//\\\
- \\/\\\\\\\\}\"\n value=\"${value//&/\\\\&}\"\n value=\"${value//\\?/\\\\\
- ?}\"\n [[ \"$value\" = \"\" ]] && value=\"\\\"$value\\\"\"\n\n replace_in_file\
- \ \"/opt/bitnami/redis-sentinel/etc/prepare-sentinel.conf\" \"^#*\\s*${key} .*\"\
- \ \"${key} ${value}\" false\n}\nsentinel_conf_add() {\n echo $'\\n'\"$@\" >>\
- \ \"/opt/bitnami/redis-sentinel/etc/prepare-sentinel.conf\"\n}\nhost_id() {\n\
- \ echo \"$1\" | openssl sha1 | awk '{print $2}'\n}\nget_sentinel_master_info()\
- \ {\n if is_boolean_yes \"$REDIS_SENTINEL_TLS_ENABLED\"; then\n sentinel_info_command=\"\
- timeout 10 redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT --tls --cert\
- \ ${REDIS_SENTINEL_TLS_CERT_FILE} --key ${REDIS_SENTINEL_TLS_KEY_FILE} --cacert\
- \ ${REDIS_SENTINEL_TLS_CA_FILE} sentinel get-master-addr-by-name redis-master\"\
- \n else\n sentinel_info_command=\"timeout 10 redis-cli -h $REDIS_SERVICE\
- \ -p $SENTINEL_SERVICE_PORT sentinel get-master-addr-by-name redis-master\"\n\
- \ fi\n info \"about to run the command: $sentinel_info_command\"\n retry_while\
- \ \"eval $sentinel_info_command\" 2 5\n}\n\n[[ -f $REDIS_PASSWORD_FILE ]] && export\
- \ REDIS_PASSWORD=\"$(< \"${REDIS_PASSWORD_FILE}\")\"\n\nmaster_in_persisted_conf=\"\
- $(get_full_hostname \"$HOSTNAME\")\"\n\nif [[ -f /opt/bitnami/redis-sentinel/etc/sentinel.conf\
- \ ]]; then\n master_in_persisted_conf=\"$(awk '/monitor/ {print $4}' /opt/bitnami/redis-sentinel/etc/sentinel.conf)\"\
- \n info \"Found previous master $master_in_persisted_conf in /opt/bitnami/redis-sentinel/etc/sentinel.conf\"\
- \n debug \"$(cat /opt/bitnami/redis-sentinel/etc/sentinel.conf | grep monitor)\"\
- \nfi\nREDIS_SENTINEL_INFO=($(get_sentinel_master_info))\nif [ \"$?\" -eq \"0\"\
- \ ]; then\n # current master's host and port obtained from other Sentinel\n\
- \ info \"printing REDIS_SENTINEL_INFO=(${REDIS_SENTINEL_INFO[0]},${REDIS_SENTINEL_INFO[1]})\"\
- \n REDIS_MASTER_HOST=${REDIS_SENTINEL_INFO[0]}\n REDIS_MASTER_PORT_NUMBER=${REDIS_SENTINEL_INFO[1]}\n\
- else\n REDIS_MASTER_HOST=\"$master_in_persisted_conf\"\n REDIS_MASTER_PORT_NUMBER=\"\
- $REDISPORT\"\nfi\nif [[ \"$REDIS_MASTER_HOST\" == \"$(get_full_hostname \"$HOSTNAME\"\
- )\" ]]; then\n export REDIS_REPLICATION_MODE=\"master\"\nelse\n export REDIS_REPLICATION_MODE=\"\
- replica\"\nfi\n\nif [[ -n \"$REDIS_EXTERNAL_MASTER_HOST\" ]]; then\n REDIS_MASTER_HOST=\"\
- $REDIS_EXTERNAL_MASTER_HOST\"\n REDIS_MASTER_PORT_NUMBER=\"${REDIS_EXTERNAL_MASTER_PORT}\"\
- \nfi\n\n# To prevent incomplete configuration and as the redis container accesses\
- \ /opt/bitnami/redis-sentinel/etc/sentinel.conf \n# as well, prepare the new config\
- \ in `prepare-sentinel.conf` and move it atomically to the ultimate destination\
- \ when it is complete.\ncp /opt/bitnami/redis-sentinel/mounted-etc/sentinel.conf\
- \ /opt/bitnami/redis-sentinel/etc/prepare-sentinel.conf\nprintf \"\\nsentinel\
- \ myid %s\" \"$(host_id \"$HOSTNAME\")\" >> /opt/bitnami/redis-sentinel/etc/prepare-sentinel.conf\n\
- \nif [[ -z \"$REDIS_MASTER_HOST\" ]] || [[ -z \"$REDIS_MASTER_PORT_NUMBER\" ]]\n\
- then\n # Prevent incorrect configuration to be written to sentinel.conf\n \
- \ error \"Redis master host is configured incorrectly (host: $REDIS_MASTER_HOST,\
- \ port: $REDIS_MASTER_PORT_NUMBER)\"\n exit 1\nfi\n\nsentinel_conf_set \"sentinel\
- \ monitor\" \"redis-master \"$REDIS_MASTER_HOST\" \"$REDIS_MASTER_PORT_NUMBER\"\
- \ 2\"\n\nadd_known_sentinel() {\n hostname=\"$1\"\n ip=\"$2\"\n\n if\
- \ [[ -n \"$hostname\" && -n \"$ip\" && \"$hostname\" != \"$HOSTNAME\" ]]; then\n\
- \ sentinel_conf_add \"sentinel known-sentinel redis-master $(get_full_hostname\
- \ \"$hostname\") $(get_port \"$hostname\" \"SENTINEL\") $(host_id \"$hostname\"\
- )\"\n fi\n}\nadd_known_replica() {\n hostname=\"$1\"\n ip=\"$2\"\n\n\
- \ if [[ -n \"$ip\" && \"$(get_full_hostname \"$hostname\")\" != \"$REDIS_MASTER_HOST\"\
- \ ]]; then\n sentinel_conf_add \"sentinel known-replica redis-master $(get_full_hostname\
- \ \"$hostname\") $(get_port \"$hostname\" \"REDIS\")\"\n fi\n}\n\n# Add available\
- \ hosts on the network as known replicas & sentinels\nfor node in $(seq 0 $((3-1)));\
- \ do\n hostname=\"redis-node-$node\"\n ip=\"$(getent hosts \"$hostname.$HEADLESS_SERVICE\"\
- \ | awk '{ print $1 }')\"\n add_known_sentinel \"$hostname\" \"$ip\"\n add_known_replica\
- \ \"$hostname\" \"$ip\"\ndone\n\necho \"\" >> /opt/bitnami/redis-sentinel/etc/prepare-sentinel.conf\n\
- echo \"sentinel announce-hostnames yes\" >> /opt/bitnami/redis-sentinel/etc/prepare-sentinel.conf\n\
- echo \"sentinel resolve-hostnames yes\" >> /opt/bitnami/redis-sentinel/etc/prepare-sentinel.conf\n\
- echo \"sentinel announce-port $SERVPORT\" >> /opt/bitnami/redis-sentinel/etc/prepare-sentinel.conf\n\
- echo \"sentinel announce-ip $(get_full_hostname \"$HOSTNAME\")\" >> /opt/bitnami/redis-sentinel/etc/prepare-sentinel.conf\n\
- mv /opt/bitnami/redis-sentinel/etc/prepare-sentinel.conf /opt/bitnami/redis-sentinel/etc/sentinel.conf\n\
- exec redis-server /opt/bitnami/redis-sentinel/etc/sentinel.conf --sentinel\n"
+ start-sentinel.sh: |
+ #!/bin/bash
+
+ . /opt/bitnami/scripts/libos.sh
+ . /opt/bitnami/scripts/libvalidations.sh
+ . /opt/bitnami/scripts/libfile.sh
+
+ HEADLESS_SERVICE="redis-headless.database.svc.cluster.local"
+ REDIS_SERVICE="redis.database.svc.cluster.local"
+
+ get_port() {
+ hostname="$1"
+ type="$2"
+
+ port_var=$(echo "${hostname^^}_SERVICE_PORT_$type" | sed "s/-/_/g")
+ port=${!port_var}
+
+ if [ -z "$port" ]; then
+ case $type in
+ "SENTINEL")
+ echo 26379
+ ;;
+ "REDIS")
+ echo 6379
+ ;;
+ esac
+ else
+ echo $port
+ fi
+ }
+
+ get_full_hostname() {
+ hostname="$1"
+ full_hostname="${hostname}.${HEADLESS_SERVICE}"
+ echo "${full_hostname}"
+ }
+
+ SERVPORT=$(get_port "$HOSTNAME" "SENTINEL")
+ REDISPORT=$(get_port "$HOSTNAME" "REDIS")
+ SENTINEL_SERVICE_PORT=$(get_port "redis" "SENTINEL")
+
+ sentinel_conf_set() {
+ local -r key="${1:?missing key}"
+ local value="${2:-}"
+
+ # Sanitize inputs
+ value="${value//\\/\\\\}"
+ value="${value//&/\\&}"
+ value="${value//\?/\\?}"
+ [[ "$value" = "" ]] && value="\"$value\""
+
+ replace_in_file "/opt/bitnami/redis-sentinel/etc/prepare-sentinel.conf" "^#*\s*${key} .*" "${key} ${value}" false
+ }
+ sentinel_conf_add() {
+ echo $'\n'"$@" >> "/opt/bitnami/redis-sentinel/etc/prepare-sentinel.conf"
+ }
+ host_id() {
+ echo "$1" | openssl sha1 | awk '{print $2}'
+ }
+ get_sentinel_master_info() {
+ if is_boolean_yes "$REDIS_SENTINEL_TLS_ENABLED"; then
+ sentinel_info_command="timeout 10 redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT --tls --cert ${REDIS_SENTINEL_TLS_CERT_FILE} --key ${REDIS_SENTINEL_TLS_KEY_FILE} --cacert ${REDIS_SENTINEL_TLS_CA_FILE} sentinel get-master-addr-by-name redis-master"
+ else
+ sentinel_info_command="timeout 10 redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT sentinel get-master-addr-by-name redis-master"
+ fi
+ info "about to run the command: $sentinel_info_command"
+ retry_while "eval $sentinel_info_command" 2 5
+ }
+
+ [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
+
+ master_in_persisted_conf="$(get_full_hostname "$HOSTNAME")"
+
+ if [[ -f /opt/bitnami/redis-sentinel/etc/sentinel.conf ]]; then
+ master_in_persisted_conf="$(awk '/monitor/ {print $4}' /opt/bitnami/redis-sentinel/etc/sentinel.conf)"
+ info "Found previous master $master_in_persisted_conf in /opt/bitnami/redis-sentinel/etc/sentinel.conf"
+ debug "$(cat /opt/bitnami/redis-sentinel/etc/sentinel.conf | grep monitor)"
+ fi
+ REDIS_SENTINEL_INFO=($(get_sentinel_master_info))
+ if [ "$?" -eq "0" ]; then
+ # current master's host and port obtained from other Sentinel
[Diff truncated by flux-local]
--- HelmRelease: database/redis StatefulSet: database/redis-node
+++ HelmRelease: database/redis StatefulSet: database/redis-node
@@ -26,13 +26,13 @@
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: redis
app.kubernetes.io/component: node
annotations:
checksum/configmap: 44827545caa1794c0c6696c4406beb71e64dd804ef278fe070efe561c4bc71b7
checksum/health: 07a9e9f1ff08347b0d2cd65e962feb94d6390f5b64a77ed1346867af2559df4a
- checksum/scripts: 32ccc4e7ace523b8dd23161349641ddef14b4cbe7299b2f342d269746faa4934
+ checksum/scripts: aae9d6391abdd7877b9bc4cc8f75cd0ab9ba7f8241335f066f04e3e94a7e7a5e
checksum/secret: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
prometheus.io/port: '9121'
prometheus.io/scrape: 'true'
spec:
automountServiceAccountToken: false
securityContext: |
--- kubernetes/apps/database/redis/app Kustomization: flux-system/redis HelmRelease: database/redis
+++ kubernetes/apps/database/redis/app Kustomization: flux-system/redis HelmRelease: database/redis
@@ -13,13 +13,13 @@
spec:
chart: redis
sourceRef:
kind: HelmRepository
name: bitnami
namespace: flux-system
- version: 19.1.5
+ version: 19.2.0
install:
remediation:
retries: 3
interval: 30m
maxHistory: 2
timeout: 15m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
19.1.5
->19.2.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.