Skip to content

Commit bd1d9ba

Browse files
committed
fix!: rename redis subchart to redis-ha
Signed-off-by: Przemek Nowak <[email protected]>
1 parent 4efa93b commit bd1d9ba

File tree

11 files changed

+72
-21
lines changed

11 files changed

+72
-21
lines changed

helm/oauth2-proxy/Chart.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ dependencies:
22
- name: redis-ha
33
repository: https://dandydeveloper.github.io/charts
44
version: 4.35.5
5-
digest: sha256:6975a29803acbfa0a631c0223167ce9ae09d19a99ebae7216236579bf225aa3e
6-
generated: "2025-12-08T08:11:37.584659269Z"
5+
digest: sha256:915c571980d63773776b84a3790131bb750457d4adc1108451c4a2f10e008c53
6+
generated: "2025-12-10T12:51:25.458945+01:00"

helm/oauth2-proxy/Chart.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: oauth2-proxy
2-
version: 9.0.1
2+
version: 10.0.0
33
apiVersion: v2
44
appVersion: 7.13.0
55
home: https://oauth2-proxy.github.io/oauth2-proxy/
@@ -16,8 +16,7 @@ dependencies:
1616
- name: redis-ha
1717
version: 4.35.5
1818
repository: https://dandydeveloper.github.io/charts
19-
alias: redis
20-
condition: redis.enabled
19+
condition: redis-ha.enabled
2120
sources:
2221
- https://github.com/oauth2-proxy/oauth2-proxy
2322
- https://github.com/oauth2-proxy/manifests
@@ -36,3 +35,8 @@ annotations:
3635
links:
3736
- name: Github PR
3837
url: https://github.com/oauth2-proxy/manifests/pull/367
38+
- kind: changed
39+
description: Breaking change: Removed alias for the Redis HA subchart dependency (use redis-ha path to configure redis)
40+
links:
41+
- name: Github PR
42+
url: https://github.com/oauth2-proxy/manifests/pull/378

helm/oauth2-proxy/README.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,48 @@ custom registries. Furthermore, it introduces the `global.imageRegistry` value t
107107

108108
This means if you were using an override for `image.repository` (to pull from a different artifact repository), you will likely have to adjust it for the new `image.registry` value. See [#367](https://github.com/oauth2-proxy/manifests/pull/367) for detailed information.
109109

110+
### To 10.0.0
111+
112+
Version 10.0.0 removes the alias for the Redis HA subchart dependency due to compatibility issues with Helm 3. Helm 3 does not support transitive conditional aliases, meaning that even when values were provided in the parent chart to disable the subchart, the aliased values were not respected correctly.
113+
114+
**Breaking Change**: If you were previously using the redis alias to configure the Redis HA subchart, you must now use the actual chart name redis-ha for all configuration values.
115+
116+
Before:
117+
118+
```yaml
119+
redis:
120+
enabled: true
121+
# ... other redis configuration
122+
```
123+
124+
After:
125+
126+
```yaml
127+
redis-ha:
128+
enabled: true
129+
# ... other redis-ha configuration
130+
```
131+
132+
Please update your values files accordingly. Refer to the official [redis-ha repository](https://github.com/DandyDeveloper/charts/tree/master/charts/redis-ha) for available configuration options.
133+
134+
Due to alias removal redis resources recreation will be required in case of default redis chart naming. If you would like to keep your current redis
135+
naming introduced in version `v8` override redis name to previous alias name like this:
136+
137+
```yaml
138+
redis-ha:
139+
nameOverride: redis
140+
enabled: true
141+
# ... other redis-ha configuration
142+
```
143+
144+
With above new chart version won't add extra `-ha` suffix to all redis resources.
145+
110146
## Configuration
111147

112148
The following table lists the configurable parameters of the oauth2-proxy chart and their default values.
113149

114150
| Parameter | Description | Default |
115-
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
151+
|-------------------------------------------------------| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
116152
| `affinity` | node/pod affinities | None |
117153
| `alphaConfig.annotations` | Configmap annotations | `{}` |
118154
| `alphaConfig.configData` | Arbitrary configuration data to append | `{}` |
@@ -234,7 +270,7 @@ The following table lists the configurable parameters of the oauth2-proxy chart
234270
| `readinessProbe.periodSeconds` | number of seconds | 10 |
235271
| `readinessProbe.successThreshold` | number of successes | 1 |
236272
| `readinessProbe.timeoutSeconds` | number of seconds | 5 |
237-
| `redis.enabled` | Enable the Redis subchart deployment | `false` |
273+
| `redis-ha.enabled` | Enable the Redis subchart deployment | `false` |
238274
| `replicaCount` | desired number of pods | `1` |
239275
| `resizePolicy` | Container resize policy for runtime resource updates. See [Kubernetes docs](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/) | `[]` |
240276
| `resources` | pod resource requests & limits | `{}` |

helm/oauth2-proxy/ci/redis-sentinel-array-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sessionStorage:
1010
- "redis://oauth2-proxy-redis-announce-1:26379"
1111

1212
# provision an instance of the redis-ha sub-chart
13-
redis:
13+
redis-ha:
1414
enabled: true
1515
fullnameOverride: oauth2-proxy-redis
1616

helm/oauth2-proxy/ci/redis-sentinel-comma-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sessionStorage:
88
connectionUrls: "redis://oauth2-proxy-redis-announce-0:26379,redis://oauth2-proxy-redis-announce-1:26379"
99

1010
# provision an instance of the redis-ha sub-chart
11-
redis:
11+
redis-ha:
1212
enabled: true
1313
fullnameOverride: oauth2-proxy-redis
1414

helm/oauth2-proxy/ci/redis-standalone-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sessionStorage:
55
password: "foo"
66

77
# provision an instance of the redis-ha sub-chart
8-
redis:
8+
redis-ha:
99
enabled: true
1010

1111
redisPassword: "foo"

helm/oauth2-proxy/templates/_helpers.tpl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,20 @@ Allow the release namespace to be overridden for multi-namespace deployments in
8989
{{- end -}}
9090
{{- end -}}
9191

92+
{{/*
93+
Redis subchart enabled check
94+
*/}}
95+
{{- define "oauth2-proxy.redis.enabled" -}}
96+
{{- eq (index .Values "redis-ha" "enabled") true -}}
97+
{{- end -}}
98+
9299
{{/*
93100
Redis subcharts fullname
94101
*/}}
95102
{{- define "oauth2-proxy.redis.fullname" -}}
96-
{{- if .Values.redis.enabled -}}
97-
{{- include "redis-ha.fullname" (dict "Chart" (dict "Name" "redis") "Release" .Release "Values" .Values.redis) -}}
103+
{{- if eq (include "oauth2-proxy.redis.enabled" .) "true" -}}
104+
{{- $redisValues := index .Values "redis-ha" | default dict -}}
105+
{{- include "redis-ha.fullname" (dict "Chart" (dict "Name" "redis") "Release" .Release "Values" $redisValues) -}}
98106
{{- else -}}
99107
{{ fail "attempting to use redis subcharts fullname, even though the subchart is not enabled. This will lead to misconfiguration" }}
100108
{{- end -}}
@@ -106,8 +114,9 @@ Compute the redis url if not set explicitly.
106114
{{- define "oauth2-proxy.redis.StandaloneUrl" -}}
107115
{{- if .Values.sessionStorage.redis.standalone.connectionUrl -}}
108116
{{ .Values.sessionStorage.redis.standalone.connectionUrl }}
109-
{{- else if .Values.redis.enabled -}}
110-
{{- printf "redis://%s:%.0f" (include "oauth2-proxy.redis.fullname" .) .Values.redis.redis.port -}}
117+
{{- else if eq (include "oauth2-proxy.redis.enabled" .) "true" -}}
118+
{{- $redisValues := index .Values "redis-ha" | default dict -}}
119+
{{- printf "redis://%s:%.0f" (include "oauth2-proxy.redis.fullname" .) $redisValues.redis.port -}}
111120
{{- else -}}
112121
{{ fail "please set sessionStorage.redis.standalone.connectionUrl or enable the redis subchart via redis.enabled" }}
113122
{{- end -}}

helm/oauth2-proxy/templates/configmap-wait-for-redis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.redis.enabled .Values.initContainers.waitForRedis.enabled }}
1+
{{- if and (eq (include "oauth2-proxy.redis.enabled" .) "true") .Values.initContainers.waitForRedis.enabled }}
22
apiVersion: v1
33
kind: ConfigMap
44
metadata:

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{{- $redisEnabled := eq (include "oauth2-proxy.redis.enabled" .) "true" -}}
2+
{{- $redisValues := index .Values "redis-ha" | default dict -}}
13
apiVersion: apps/v1
24
kind: Deployment
35
metadata:
@@ -64,12 +66,12 @@ spec:
6466
hostAliases:
6567
{{ toYaml .Values.hostAliases | nindent 8}}
6668
{{- end }}
67-
{{- if or (and .Values.redis.enabled .Values.initContainers.waitForRedis.enabled) .Values.extraInitContainers }}
69+
{{- if or (and $redisEnabled .Values.initContainers.waitForRedis.enabled) .Values.extraInitContainers }}
6870
initContainers:
6971
{{- if .Values.extraInitContainers }}
7072
{{- toYaml .Values.extraInitContainers | nindent 6 }}
7173
{{- end }}
72-
{{- if and .Values.redis.enabled .Values.initContainers.waitForRedis.enabled }}
74+
{{- if and $redisEnabled .Values.initContainers.waitForRedis.enabled }}
7375
- name: wait-for-redis
7476
image: "{{ .Values.initContainers.waitForRedis.image.repository }}:{{ .Values.initContainers.waitForRedis.image.tag }}"
7577
imagePullPolicy: {{ .Values.initContainers.waitForRedis.image.pullPolicy }}
@@ -199,7 +201,7 @@ spec:
199201
{{- if eq (default "cookie" .Values.sessionStorage.type) "redis" }}
200202
- name: OAUTH2_PROXY_SESSION_STORE_TYPE
201203
value: "redis"
202-
{{- if or .Values.sessionStorage.redis.existingSecret .Values.sessionStorage.redis.password (and .Values.redis.enabled (.Values.redis.auth))}}
204+
{{- if or .Values.sessionStorage.redis.existingSecret .Values.sessionStorage.redis.password (and $redisEnabled ($redisValues.auth))}}
203205
- name: OAUTH2_PROXY_REDIS_PASSWORD
204206
valueFrom:
205207
secretKeyRef:
@@ -358,7 +360,7 @@ spec:
358360
secretName: {{ template "oauth2-proxy.fullname" . }}-accesslist
359361
{{- end }}
360362
{{- end }}
361-
{{- if and .Values.redis.enabled .Values.initContainers.waitForRedis.enabled }}
363+
{{- if and $redisEnabled .Values.initContainers.waitForRedis.enabled }}
362364
- name: redis-script
363365
configMap:
364366
name: {{ template "oauth2-proxy.fullname" . }}-wait-for-redis

helm/oauth2-proxy/templates/serviceaccount.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ imagePullSecrets:
2222
{{ toYaml . | indent 2 }}
2323
{{- end }}
2424
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
25-
{{- if and .Values.redis.enabled .Values.initContainers.waitForRedis.enabled }}
25+
{{- if and (eq (include "oauth2-proxy.redis.enabled" .) "true") .Values.initContainers.waitForRedis.enabled }}
2626
---
2727
kind: Role
2828
apiVersion: rbac.authorization.k8s.io/v1

0 commit comments

Comments
 (0)