Skip to content

Commit

Permalink
Merge pull request #205 from Pionerd/wait-for-redis-sentinel
Browse files Browse the repository at this point in the history
Fix wait for redis
  • Loading branch information
pierluigilenoci authored May 7, 2024
2 parents 1d09e96 + bead178 commit b814da4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions helm/oauth2-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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/
Expand Down Expand Up @@ -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
url: https://github.com/oauth2-proxy/manifests/issues/205
4 changes: 2 additions & 2 deletions helm/oauth2-proxy/scripts/check-redis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions helm/oauth2-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ 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" }}
- name: OAUTH2_PROXY_REDIS_USE_SENTINEL
value: "true"
- name: OAUTH2_PROXY_REDIS_SENTINEL_CONNECTION_URLS
value: {{ .Values.sessionStorage.redis.sentinel.connectionUrls }}
{{- end }}
Expand Down

0 comments on commit b814da4

Please sign in to comment.