Skip to content

Commit 2e4cf2f

Browse files
authored
fix: connection urls to be automatically comma separated (#268)
1 parent d0e7fc4 commit 2e4cf2f

File tree

6 files changed

+61
-11
lines changed

6 files changed

+61
-11
lines changed

.github/workflows/lint-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Install Prometheus Operator CRDs
4141
id: prom
42-
run: kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.78/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
42+
run: kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.80.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
4343
if: steps.list-changed.outputs.changed == 'true'
4444

4545
- name: Run chart-testing (install)

helm/oauth2-proxy/Chart.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: oauth2-proxy
2-
version: 7.10.3
2+
version: 7.10.4
33
apiVersion: v2
44
appVersion: 7.8.1
55
home: https://oauth2-proxy.github.io/oauth2-proxy/
@@ -31,8 +31,8 @@ maintainers:
3131
kubeVersion: ">=1.16.0-0"
3232
annotations:
3333
artifacthub.io/changes: |
34-
- kind: changed
35-
description: update helm release redis to v20.6.3
34+
- kind: fixed
35+
description: automatically concatenate connectionUrls with comma
3636
links:
3737
- name: Github PR
38-
url: https://github.com/oauth2-proxy/manifests/pull/279
38+
url: https://github.com/oauth2-proxy/manifests/pull/268
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
sessionStorage:
2+
type: redis
3+
redis:
4+
clientType: sentinel
5+
sentinel:
6+
password: "foo"
7+
masterName: "mymaster"
8+
connectionUrls:
9+
- "redis://oauth2-proxy-redis:26379"
10+
- "redis://oauth2-proxy-redis:26379"
11+
redis:
12+
# provision an instance of the redis sub-chart
13+
enabled: true
14+
fullnameOverride: oauth2-proxy-redis
15+
architecture: replication
16+
sentinel:
17+
enabled: true
18+
masterSet: mymaster
19+
global:
20+
redis:
21+
password: "foo"
22+
initContainers:
23+
waitForRedis:
24+
enabled: true
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
sessionStorage:
2+
type: redis
3+
redis:
4+
clientType: sentinel
5+
sentinel:
6+
password: "foo"
7+
masterName: "mymaster"
8+
connectionUrls: "redis://oauth2-proxy-redis:26379,redis://oauth2-proxy-redis:26379"
9+
redis:
10+
# provision an instance of the redis sub-chart
11+
enabled: true
12+
fullnameOverride: oauth2-proxy-redis
13+
architecture: replication
14+
sentinel:
15+
enabled: true
16+
masterSet: mymaster
17+
global:
18+
redis:
19+
password: "foo"
20+
initContainers:
21+
waitForRedis:
22+
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
@@ -371,8 +371,10 @@ sessionStorage:
371371
# URL of redis standalone server for redis session storage (e.g. `redis://HOST[:PORT]`). Automatically generated if not set
372372
connectionUrl: ""
373373
cluster:
374-
# List of Redis cluster connection URLs (e.g. `["redis://127.0.0.1:8000", "redis://127.0.0.1:8000"]`)
374+
# List of Redis cluster connection URLs. Array or single string allowed.
375375
connectionUrls: []
376+
# - "redis://127.0.0.1:8000"
377+
# - "redis://127.0.0.1:8001"
376378
sentinel:
377379
# Name of the Kubernetes secret containing the redis sentinel password value (see also `sessionStorage.redis.sentinel.passwordKey`). Default: `sessionStorage.redis.existingSecret`
378380
existingSecret: ""
@@ -382,8 +384,10 @@ sessionStorage:
382384
passwordKey: "redis-sentinel-password"
383385
# Redis sentinel master name
384386
masterName: ""
385-
# List of Redis sentinel connection URLs (e.g. `["redis://127.0.0.1:8000", "redis://127.0.0.1:8000"]`)
387+
# List of Redis cluster connection URLs. Array or single string allowed.
386388
connectionUrls: []
389+
# - "redis://127.0.0.1:8000"
390+
# - "redis://127.0.0.1:8001"
387391

388392
# Enables and configure the automatic deployment of the redis subchart
389393
redis:

0 commit comments

Comments
 (0)