From 0750b72c8279b3450238b388aaa3e40aa794092c Mon Sep 17 00:00:00 2001 From: ioan hodor Date: Sat, 19 Oct 2024 14:12:20 +0000 Subject: [PATCH] chore: 'check-redis.sh' script accounts for rediss:// scheme --- helm/oauth2-proxy/Chart.yaml | 8 ++++---- helm/oauth2-proxy/scripts/check-redis.sh | 11 ++++++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 1ad7f7f..ce683f8 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 7.7.27 +version: 7.7.28 apiVersion: v2 appVersion: 7.7.1 home: https://oauth2-proxy.github.io/oauth2-proxy/ @@ -34,8 +34,8 @@ maintainers: kubeVersion: ">=1.9.0-0" annotations: artifacthub.io/changes: | - - kind: fixed - description: Updated the Redis chart to the latest version. + - kind: added + description: Added support for 'rediss://' scheme in 'check-redis.sh' script links: - name: Github PR - url: https://github.com/oauth2-proxy/manifests/pull/247 + url: https://github.com/oauth2-proxy/manifests/pull/249 diff --git a/helm/oauth2-proxy/scripts/check-redis.sh b/helm/oauth2-proxy/scripts/check-redis.sh index 24e628f..4420b53 100644 --- a/helm/oauth2-proxy/scripts/check-redis.sh +++ b/helm/oauth2-proxy/scripts/check-redis.sh @@ -24,7 +24,16 @@ check_redis() { # For parsing and checking connections parse_and_check() { url=$1 - clean_url=${url#redis://} + + # Strip either redis:// or rediss:// + if [[ $url == rediss://* ]]; then + clean_url=${url#rediss://} + echo "Using secure Rediss connection..." + else + clean_url=${url#redis://} + echo "Using standard Redis connection..." + fi + host=$(echo $clean_url | cut -d':' -f1) port=$(echo $clean_url | cut -d':' -f2) check_redis $host $port