Skip to content

Commit ec6b37d

Browse files
Update oauth2-proxy to 7.1.3 & set default redis url if no one is defined in standalone mode (#29)
* Update oauth2-proxy to 7.1.3. * Generate redis URL if not set. One should not have to specify the redis url from a subchart.
1 parent b22add9 commit ec6b37d

File tree

7 files changed

+27
-11
lines changed

7 files changed

+27
-11
lines changed

helm/oauth2-proxy/Chart.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: redis
3+
repository: https://charts.bitnami.com/bitnami
4+
version: 10.6.19
5+
digest: sha256:9967a7f9f35d93e0c3ac69e4cfbea4ea8d38cfd12a7ad416dd81256800eb040f
6+
generated: "2021-05-14T12:07:28.273068+02:00"

helm/oauth2-proxy/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: oauth2-proxy
2-
version: 3.2.13
2+
version: 3.3.0
33
apiVersion: v2
4-
appVersion: 5.1.0
4+
appVersion: 7.1.3
55
home: https://oauth2-proxy.github.io/oauth2-proxy/
66
description: A reverse proxy that provides authentication with Google, Github or other providers
77
keywords:

helm/oauth2-proxy/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ Parameter | Description | Default
8383
`htpasswdFile.existingSecret` | existing Kubernetes secret to use for OAuth2 htpasswd file | `""`
8484
`httpScheme` | `http` or `https`. `name` used for port on the deployment. `httpGet` port `name` and `scheme` used for `liveness`- and `readinessProbes`. `name` and `targetPort` used for the service. | `http`
8585
`image.pullPolicy` | Image pull policy | `IfNotPresent`
86-
`image.repository` | Image repository | `quay.io/pusher/oauth2_proxy`
87-
`image.tag` | Image tag | `v5.1.0`
86+
`image.repository` | Image repository | `quay.io/oauth2-proxy/oauth2-proxy`
87+
`image.tag` | Image tag | `v7.1.3`
8888
`imagePullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods)
8989
`ingress.enabled` | Enable Ingress | `false`
9090
`ingress.path` | Ingress accepted path | `/`
@@ -125,7 +125,7 @@ Parameter | Description | Default
125125
`sessionStorage.redis.existingSecret` | existing Kubernetes secret to use for redis-password and redis-sentinel-password | `""`
126126
`sessionStorage.redis.password` | Redis password. Applicable for all Redis configurations | `nil`
127127
`sessionStorage.redis.clientType` | Allows the user to select which type of client will be used for redis instance. Possible options are: `sentinel`, `cluster` or `standalone` | `standalone`
128-
`sessionStorage.redis.standalone.connectionUrl` | URL of redis standalone server for redis session storage (e.g. redis://HOST[:PORT]) | `nil`
128+
`sessionStorage.redis.standalone.connectionUrl` | URL of redis standalone server for redis session storage (e.g. redis://HOST[:PORT]). Automatically generated if not set. | `""`
129129
`sessionStorage.redis.cluster.connectionUrls` | List of Redis cluster connection URLs (e.g. redis://HOST[:PORT]) | `[]`
130130
`sessionStorage.redis.sentinel.password` | Redis sentinel password. Used only for sentinel connection; any redis node passwords need to use `sessionStorage.redis.password` | `nil`
131131
`sessionStorage.redis.sentinel.masterName` | Redis sentinel master name | `nil`

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ sessionStorage:
22
type: redis
33
redis:
44
clientType: "standalone"
5-
standalone:
6-
connectionUrl: "redis://oauth2-proxy-redis-master:6379"
5+
password: "foo"
76
redis:
87
# provision an instance of the redis sub-chart
98
enabled: true
9+
password: "foo"

helm/oauth2-proxy/templates/_helpers.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,12 @@ Create the name of the service account to use
5252
{{ default "default" .Values.serviceAccount.name }}
5353
{{- end -}}
5454
{{- end -}}
55+
56+
57+
{{- define "oauth2-proxy.redisStandaloneUrl" -}}
58+
{{- if .Values.sessionStorage.redis.standalone.connectionUrl -}}
59+
{{ .Values.sessionStorage.redis.standalone.connectionUrl }}
60+
{{- else -}}
61+
{{- printf "redis://%s-redis-master:6379" (include "oauth2-proxy.fullname" .) -}}
62+
{{- end -}}
63+
{{- end -}}

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ spec:
107107
{{- end }}
108108
{{- if eq (default "" .Values.sessionStorage.redis.clientType) "standalone" }}
109109
- name: OAUTH2_PROXY_REDIS_CONNECTION_URL
110-
value: {{ .Values.sessionStorage.redis.standalone.connectionUrl }}
110+
value: {{ include "oauth2-proxy.redisStandaloneUrl" . }}
111111
{{- else if eq (default "" .Values.sessionStorage.redis.clientType) "cluster" }}
112112
- name: OAUTH2_PROXY_REDIS_USE_CLUSTER
113113
value: "true"

helm/oauth2-proxy/values.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ config:
99
# Use an existing secret for OAuth2 credentials (see secret.yaml for required fields)
1010
# Example:
1111
# existingSecret: secret
12-
cookieSecret: "XXXXXXXXXX"
12+
cookieSecret: "XXXXXXXXXXXXXXXX"
1313
# The name of the cookie that oauth2-proxy will create
1414
# If left empty, it will default to the release name
1515
cookieName: ""
@@ -32,8 +32,8 @@ config:
3232
# existingConfig: config
3333

3434
image:
35-
repository: "quay.io/pusher/oauth2_proxy"
36-
tag: "v5.1.0"
35+
repository: "quay.io/oauth2-proxy/oauth2-proxy"
36+
tag: "v7.1.3"
3737
pullPolicy: "IfNotPresent"
3838

3939
# Optionally specify an array of imagePullSecrets.
@@ -201,6 +201,7 @@ sessionStorage:
201201
# Can be one of sentinel/cluster/standalone
202202
clientType: "standalone"
203203
standalone:
204+
# If empty and sessionStorage type is redis, will automatically be generated.
204205
connectionUrl: ""
205206
cluster:
206207
# connectionUrls: ["redis://127.0.0.1:8000", "redis://127.0.0.1:8000"]

0 commit comments

Comments
 (0)