Skip to content
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

fix(container): update redis docker tag to v20.4.1 #3954

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Conversation

mchesterbot[bot]
Copy link
Contributor

@mchesterbot mchesterbot bot commented Dec 10, 2024

This PR contains the following updates:

Package Update Change
redis (source) patch 20.4.0 -> 20.4.1

Release Notes

bitnami/charts (redis)

v20.4.1


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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@mchesterbot mchesterbot bot requested a review from mchestr as a code owner December 10, 2024 11:23
@mchesterbot mchesterbot bot added the area/kubernetes Changes made in the kubernetes directory label Dec 10, 2024
@mchesterbot
Copy link
Contributor Author

mchesterbot bot commented Dec 10, 2024

--- kubernetes/apps/default/redis/app Kustomization: flux-system/cluster-apps-redis HelmRelease: default/redis

+++ kubernetes/apps/default/redis/app Kustomization: flux-system/cluster-apps-redis HelmRelease: default/redis

@@ -12,13 +12,13 @@

     spec:
       chart: redis
       sourceRef:
         kind: HelmRepository
         name: bitnami-charts
         namespace: flux-system
-      version: 20.4.0
+      version: 20.4.1
   install:
     createNamespace: true
     remediation:
       retries: 3
   interval: 30m
   maxHistory: 2

@mchesterbot
Copy link
Contributor Author

mchesterbot bot commented Dec 10, 2024

--- HelmRelease: default/redis ConfigMap: default/redis-scripts

+++ HelmRelease: default/redis ConfigMap: default/redis-scripts

@@ -51,40 +51,43 @@

         REDIS_SERVICE="$REDIS_EXTERNAL_MASTER_HOST"
     else
         REDIS_SERVICE="redis.default.svc.cluster.local"
     fi
 
     SENTINEL_SERVICE_PORT=$(get_port "redis" "SENTINEL")
+
+    redis_cli_command() {
+        local timeout="${1:-0}"
+
+        local args=("-h" "$REDIS_SERVICE" "-p" "$SENTINEL_SERVICE_PORT")
+        local command="redis-cli"
+        if is_boolean_yes "$REDIS_TLS_ENABLED"; then
+            args+=("--tls" "--cert" "$REDIS_TLS_CERT_FILE" "--key" "$REDIS_TLS_KEY_FILE")
+            [ -n "$REDIS_TLS_CA_FILE" ] && args+=("--cacert" "$REDIS_TLS_CA_FILE")
+        fi
+        if [ "$timeout" -gt 0 ]; then
+            command="timeout $timeout $command"
+        fi
+
+        echo " $command ${args[*]}"
+    }
+
     validate_quorum() {
-        if is_boolean_yes "$REDIS_TLS_ENABLED"; then
-            quorum_info_command="redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT --tls --cert ${REDIS_TLS_CERT_FILE} --key ${REDIS_TLS_KEY_FILE} --cacert ${REDIS_TLS_CA_FILE} sentinel master redis-master"
-        else
-            quorum_info_command="redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT sentinel master redis-master"
-        fi
+        quorum_info_command="$(redis_cli_command) sentinel master redis-master"
         info "about to run the command: $quorum_info_command"
         eval $quorum_info_command | grep -Fq "s_down"
     }
 
     trigger_manual_failover() {
-        if is_boolean_yes "$REDIS_TLS_ENABLED"; then
-            failover_command="redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT --tls --cert ${REDIS_TLS_CERT_FILE} --key ${REDIS_TLS_KEY_FILE} --cacert ${REDIS_TLS_CA_FILE} sentinel failover redis-master"
-        else
-            failover_command="redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT sentinel failover redis-master"
-        fi
-
+        failover_command="$(redis_cli_command) sentinel failover redis-master"
         info "about to run the command: $failover_command"
         eval $failover_command
     }
 
     get_sentinel_master_info() {
-        if is_boolean_yes "$REDIS_TLS_ENABLED"; then
-            sentinel_info_command="timeout 10 redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT --tls --cert ${REDIS_TLS_CERT_FILE} --key ${REDIS_TLS_KEY_FILE} --cacert ${REDIS_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
-
+        sentinel_info_command="$(redis_cli_command 10) sentinel get-master-addr-by-name redis-master"
         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}")"
     [[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
@@ -349,17 +352,20 @@

     #!/bin/bash
 
     . /opt/bitnami/scripts/libvalidations.sh
     . /opt/bitnami/scripts/libos.sh
 
     run_redis_command() {
+        local args=("-h" "127.0.0.1")
         if is_boolean_yes "$REDIS_TLS_ENABLED"; then
-            redis-cli -h 127.0.0.1 -p "$REDIS_TLS_PORT" --tls --cert "$REDIS_TLS_CERT_FILE" --key "$REDIS_TLS_KEY_FILE" --cacert "$REDIS_TLS_CA_FILE" "$@"
-        else
-            redis-cli -h 127.0.0.1 -p "$REDIS_PORT" "$@"
-        fi
+            args+=("-p" "$REDIS_TLS_PORT" "--tls" "--cert" "$REDIS_TLS_CERT_FILE" "--key" "$REDIS_TLS_KEY_FILE")
+            [ -n "$REDIS_TLS_CA_FILE" ] && args+=("--cacert" "$REDIS_TLS_CA_FILE")
+        else
+            args+=("-p" "$REDIS_PORT")
+        fi
+        redis-cli "${args[@]}" "$@"
     }
     is_master() {
         REDIS_ROLE=$(run_redis_command role | head -1)
         [[ "$REDIS_ROLE" == "master" ]]
     }
 
--- HelmRelease: default/redis StatefulSet: default/redis-node

+++ HelmRelease: default/redis StatefulSet: default/redis-node

@@ -27,13 +27,13 @@

         app.kubernetes.io/managed-by: Helm
         app.kubernetes.io/name: redis
         app.kubernetes.io/component: node
       annotations:
         checksum/configmap: e470e083e9303f0e697a283609a067fa3b02d321f99519c92527543610bf37d4
         checksum/health: 07a9e9f1ff08347b0d2cd65e962feb94d6390f5b64a77ed1346867af2559df4a
-        checksum/scripts: b1107a8086108b57b02458237e19d41b4a3706e5bbdd591b5cdac2fdae649b84
+        checksum/scripts: 99dd33b4cbe3d0b1255908db33b0ad63c20ffca5717e04a161a5f9cd676e68b6
         checksum/secret: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
         prometheus.io/port: '9121'
         prometheus.io/scrape: 'true'
     spec:
       automountServiceAccountToken: false
       securityContext:

@mchesterbot mchesterbot bot force-pushed the renovate/redis-20.x branch from 259f6d7 to 9c2a20c Compare December 10, 2024 13:34
@mchestr mchestr merged commit 1563706 into main Dec 11, 2024
5 checks passed
@mchesterbot mchesterbot bot deleted the renovate/redis-20.x branch December 11, 2024 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes Changes made in the kubernetes directory renovate/container type/patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant