Skip to content

Commit b814da4

Browse files
Merge pull request #205 from Pionerd/wait-for-redis-sentinel
Fix wait for redis
2 parents 1d09e96 + bead178 commit b814da4

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

helm/oauth2-proxy/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: oauth2-proxy
2-
version: 7.5.3
2+
version: 7.5.4
33
apiVersion: v2
44
appVersion: 7.6.0
55
home: https://oauth2-proxy.github.io/oauth2-proxy/
@@ -35,7 +35,7 @@ kubeVersion: ">=1.9.0-0"
3535
annotations:
3636
artifacthub.io/changes: |
3737
- kind: changed
38-
description: Redis parameters update in values
38+
description: Wait for redis script fixes for cluster and sentinel
3939
links:
4040
- name: Github PR
41-
url: https://github.com/oauth2-proxy/manifests/issues/202
41+
url: https://github.com/oauth2-proxy/manifests/issues/205

helm/oauth2-proxy/scripts/check-redis.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ parse_and_check() {
3131
}
3232

3333
# Main
34-
if [ "$OAUTH2_PROXY_REDIS_USE_CLUSTER" = "true" ]; then
34+
if [ -n "$OAUTH2_PROXY_REDIS_CLUSTER_CONNECTION_URLS" ]; then
3535
echo "Checking Redis in cluster mode..."
3636
echo "$OAUTH2_PROXY_REDIS_CLUSTER_CONNECTION_URLS" | tr ',' '\n' | while read -r addr; do
3737
parse_and_check $addr || exit 1
3838
done
39-
elif [ "$OAUTH2_PROXY_REDIS_USE_SENTINEL" = "true" ]; then
39+
elif [ -n "$OAUTH2_PROXY_REDIS_SENTINEL_CONNECTION_URLS" ]; then
4040
echo "Checking Redis in sentinel mode..."
4141
echo "$OAUTH2_PROXY_REDIS_SENTINEL_CONNECTION_URLS" | tr ',' '\n' | while read -r addr; do
4242
parse_and_check $addr || exit 1

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,13 @@ spec:
7272
- name: OAUTH2_PROXY_REDIS_CONNECTION_URL
7373
value: {{ include "oauth2-proxy.redis.StandaloneUrl" . }}
7474
{{- else if eq (default "" .Values.sessionStorage.redis.clientType) "cluster" }}
75+
- name: OAUTH2_PROXY_REDIS_USE_CLUSTER
76+
value: "true"
7577
- name: OAUTH2_PROXY_REDIS_CLUSTER_CONNECTION_URLS
7678
value: {{ .Values.sessionStorage.redis.cluster.connectionUrls }}
7779
{{- else if eq (default "" .Values.sessionStorage.redis.clientType) "sentinel" }}
80+
- name: OAUTH2_PROXY_REDIS_USE_SENTINEL
81+
value: "true"
7882
- name: OAUTH2_PROXY_REDIS_SENTINEL_CONNECTION_URLS
7983
value: {{ .Values.sessionStorage.redis.sentinel.connectionUrls }}
8084
{{- end }}

0 commit comments

Comments
 (0)