From 61010c35f6b945a7fe06a486048c93f3e5aeeea7 Mon Sep 17 00:00:00 2001 From: Pieter van der Giessen Date: Tue, 7 May 2024 16:47:41 +0200 Subject: [PATCH 1/4] Fix wait for redis Signed-off-by: Pieter van der Giessen --- helm/oauth2-proxy/Chart.yaml | 4 ++-- helm/oauth2-proxy/scripts/check-redis.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 393d930..1ce6575 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 7.5.3 +version: 7.5.4 apiVersion: v2 appVersion: 7.6.0 home: https://oauth2-proxy.github.io/oauth2-proxy/ @@ -35,7 +35,7 @@ kubeVersion: ">=1.9.0-0" annotations: artifacthub.io/changes: | - kind: changed - description: Redis parameters update in values + description: Wait for redis script fixes for cluster and sentinel links: - name: Github PR url: https://github.com/oauth2-proxy/manifests/issues/202 diff --git a/helm/oauth2-proxy/scripts/check-redis.sh b/helm/oauth2-proxy/scripts/check-redis.sh index 1785190..24e628f 100644 --- a/helm/oauth2-proxy/scripts/check-redis.sh +++ b/helm/oauth2-proxy/scripts/check-redis.sh @@ -31,12 +31,12 @@ parse_and_check() { } # Main -if [ "$OAUTH2_PROXY_REDIS_USE_CLUSTER" = "true" ]; then +if [ -n "$OAUTH2_PROXY_REDIS_CLUSTER_CONNECTION_URLS" ]; then echo "Checking Redis in cluster mode..." echo "$OAUTH2_PROXY_REDIS_CLUSTER_CONNECTION_URLS" | tr ',' '\n' | while read -r addr; do parse_and_check $addr || exit 1 done -elif [ "$OAUTH2_PROXY_REDIS_USE_SENTINEL" = "true" ]; then +elif [ -n "$OAUTH2_PROXY_REDIS_SENTINEL_CONNECTION_URLS" ]; then echo "Checking Redis in sentinel mode..." echo "$OAUTH2_PROXY_REDIS_SENTINEL_CONNECTION_URLS" | tr ',' '\n' | while read -r addr; do parse_and_check $addr || exit 1 From 3bcaf92e8bb9ce123a65b4a9d5e3c71d7d8988dd Mon Sep 17 00:00:00 2001 From: Pieter van der Giessen Date: Tue, 7 May 2024 16:48:21 +0200 Subject: [PATCH 2/4] Adjust PR ID Signed-off-by: Pieter van der Giessen --- helm/oauth2-proxy/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 1ce6575..4be7b22 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -38,4 +38,4 @@ annotations: description: Wait for redis script fixes for cluster and sentinel links: - name: Github PR - url: https://github.com/oauth2-proxy/manifests/issues/202 + url: https://github.com/oauth2-proxy/manifests/issues/205 From 2219b8c86614ae86e0d2e14cb392d0ea30a0d7d7 Mon Sep 17 00:00:00 2001 From: Pieter van der Giessen Date: Tue, 7 May 2024 16:52:55 +0200 Subject: [PATCH 3/4] Add use sentinel env var Signed-off-by: Pieter van der Giessen --- helm/oauth2-proxy/templates/deployment.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index be20a45..b896864 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -75,6 +75,8 @@ spec: - name: OAUTH2_PROXY_REDIS_CLUSTER_CONNECTION_URLS value: {{ .Values.sessionStorage.redis.cluster.connectionUrls }} {{- else if eq (default "" .Values.sessionStorage.redis.clientType) "sentinel" }} + - name: OAUTH2_PROXY_REDIS_USE_SENTINEL + value: "true" - name: OAUTH2_PROXY_REDIS_SENTINEL_CONNECTION_URLS value: {{ .Values.sessionStorage.redis.sentinel.connectionUrls }} {{- end }} From bead1784d26a1ef638a9e91c342e0e8fb59ecc92 Mon Sep 17 00:00:00 2001 From: Pieter van der Giessen Date: Tue, 7 May 2024 16:54:01 +0200 Subject: [PATCH 4/4] Add OAUTH2_PROXY_REDIS_USE_CLUSTER Signed-off-by: Pieter van der Giessen --- helm/oauth2-proxy/templates/deployment.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index b896864..ee280d0 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -72,6 +72,8 @@ spec: - name: OAUTH2_PROXY_REDIS_CONNECTION_URL value: {{ include "oauth2-proxy.redis.StandaloneUrl" . }} {{- else if eq (default "" .Values.sessionStorage.redis.clientType) "cluster" }} + - name: OAUTH2_PROXY_REDIS_USE_CLUSTER + value: "true" - name: OAUTH2_PROXY_REDIS_CLUSTER_CONNECTION_URLS value: {{ .Values.sessionStorage.redis.cluster.connectionUrls }} {{- else if eq (default "" .Values.sessionStorage.redis.clientType) "sentinel" }}