Skip to content

Commit 0a6c1a0

Browse files
committed
fix: connection urls to be automatically comma separated
1 parent 49c2289 commit 0a6c1a0

File tree

4 files changed

+31
-9
lines changed

4 files changed

+31
-9
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.8.0
2+
version: 7.8.1
33
apiVersion: v2
44
appVersion: 7.7.1
55
home: https://oauth2-proxy.github.io/oauth2-proxy/
@@ -35,7 +35,7 @@ kubeVersion: ">=1.16.0-0"
3535
annotations:
3636
artifacthub.io/changes: |
3737
- kind: added
38-
description: allow templates in annotations
38+
description: automatically concatenate connectionUrls with comma
3939
links:
4040
- name: Github PR
41-
url: https://github.com/oauth2-proxy/manifests/pull/256
41+
url: https://github.com/oauth2-proxy/manifests/pull/268
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
sessionStorage:
2+
type: redis
3+
redis:
4+
clientType: sentinel
5+
sentinel:
6+
password: "foo"
7+
connectionUrls:
8+
- "redis://oauth2-proxy-redis.svc:6379"
9+
redis:
10+
# provision an instance of the redis sub-chart
11+
enabled: true
12+
architecture: replicate
13+
global:
14+
redis:
15+
password: "foo"
16+
initContainers:
17+
waitForRedis:
18+
enabled: true

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ spec:
7979
- name: OAUTH2_PROXY_REDIS_USE_CLUSTER
8080
value: "true"
8181
- name: OAUTH2_PROXY_REDIS_CLUSTER_CONNECTION_URLS
82-
value: {{ .Values.sessionStorage.redis.cluster.connectionUrls }}
82+
value: {{ join "," .Values.sessionStorage.redis.cluster.connectionUrls }}
8383
{{- else if eq (default "" .Values.sessionStorage.redis.clientType) "sentinel" }}
8484
- name: OAUTH2_PROXY_REDIS_USE_SENTINEL
8585
value: "true"
8686
- name: OAUTH2_PROXY_REDIS_SENTINEL_CONNECTION_URLS
87-
value: {{ .Values.sessionStorage.redis.sentinel.connectionUrls }}
87+
value: {{ join "," .Values.sessionStorage.redis.sentinel.connectionUrls }}
8888
{{- end }}
8989
{{- if .Values.initContainers.waitForRedis.securityContext.enabled }}
9090
{{- $securityContext := unset .Values.initContainers.waitForRedis.securityContext "enabled" }}
@@ -213,14 +213,14 @@ spec:
213213
- name: OAUTH2_PROXY_REDIS_USE_CLUSTER
214214
value: "true"
215215
- name: OAUTH2_PROXY_REDIS_CLUSTER_CONNECTION_URLS
216-
value: {{ .Values.sessionStorage.redis.cluster.connectionUrls }}
216+
value: {{ join "," .Values.sessionStorage.redis.cluster.connectionUrls }}
217217
{{- else if eq (default "" .Values.sessionStorage.redis.clientType) "sentinel" }}
218218
- name: OAUTH2_PROXY_REDIS_USE_SENTINEL
219219
value: "true"
220220
- name: OAUTH2_PROXY_REDIS_SENTINEL_MASTER_NAME
221221
value: {{ .Values.sessionStorage.redis.sentinel.masterName }}
222222
- name: OAUTH2_PROXY_REDIS_SENTINEL_CONNECTION_URLS
223-
value: {{ .Values.sessionStorage.redis.sentinel.connectionUrls }}
223+
value: {{ join "," .Values.sessionStorage.redis.sentinel.connectionUrls }}
224224
{{- if or .Values.sessionStorage.redis.sentinel.existingSecret .Values.sessionStorage.redis.existingSecret .Values.sessionStorage.redis.sentinel.password }}
225225
- name: OAUTH2_PROXY_REDIS_SENTINEL_PASSWORD
226226
valueFrom:

helm/oauth2-proxy/values.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,10 @@ sessionStorage:
369369
# URL of redis standalone server for redis session storage (e.g. `redis://HOST[:PORT]`). Automatically generated if not set
370370
connectionUrl: ""
371371
cluster:
372-
# List of Redis cluster connection URLs (e.g. `["redis://127.0.0.1:8000", "redis://127.0.0.1:8000"]`)
372+
# List of Redis cluster connection URLs. Array or single string allowed.
373373
connectionUrls: []
374+
# - "redis://127.0.0.1:8000"
375+
# - "redis://127.0.0.1:8001"
374376
sentinel:
375377
# Name of the Kubernetes secret containing the redis sentinel password value (see also `sessionStorage.redis.sentinel.passwordKey`). Default: `sessionStorage.redis.existingSecret`
376378
existingSecret: ""
@@ -380,8 +382,10 @@ sessionStorage:
380382
passwordKey: "redis-sentinel-password"
381383
# Redis sentinel master name
382384
masterName: ""
383-
# List of Redis sentinel connection URLs (e.g. `["redis://127.0.0.1:8000", "redis://127.0.0.1:8000"]`)
385+
# List of Redis cluster connection URLs. Array or single string allowed.
384386
connectionUrls: []
387+
# - "redis://127.0.0.1:8000"
388+
# - "redis://127.0.0.1:8001"
385389

386390
# Enables and configure the automatic deployment of the redis subchart
387391
redis:

0 commit comments

Comments
 (0)