Skip to content

Commit 2acf063

Browse files
Merge branch 'oauth2-proxy:main' into template_fix
2 parents 46cc216 + 1f5d7a7 commit 2acf063

File tree

4 files changed

+25
-13
lines changed

4 files changed

+25
-13
lines changed

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: 6.15.2
2+
version: 6.16.0
33
apiVersion: v2
44
appVersion: 7.4.0
55
home: https://oauth2-proxy.github.io/oauth2-proxy/
@@ -34,8 +34,8 @@ maintainers:
3434
kubeVersion: ">=1.9.0-0"
3535
annotations:
3636
artifacthub.io/changes: |
37-
- kind: fixed
38-
description: Drop capabilities of wait-for-redis container
37+
- kind: added
38+
description: securityContext and timeout of the initContainer wait-for-redis configurable via values.
3939
links:
4040
- name: Github PR
41-
url: https://github.com/oauth2-proxy/manifests/pull/158
41+
url: https://github.com/oauth2-proxy/manifests/pull/159

helm/oauth2-proxy/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ Parameter | Description | Default
144144
`ingress.hosts` | Ingress accepted hostnames | `nil`
145145
`ingress.tls` | Ingress TLS configuration | `nil`
146146
`initContainers.waitForRedis.enabled` | if `redis.enabled` is true, use an init container to wait for the redis master pod to be ready. If `serviceAccount.enabled` is true, create additionally a role/binding to get, list and watch the redis master pod | `true`
147-
`initContainers.waitForRedis.kubectlVersion` | kubectl version to use for the init container | `printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor`
147+
`initContainers.waitForRedis.kubectlVersion` | kubectl version to use for the init container | `printf "%s.%s" .Capabilities.KubeVersion.Major (.Capabilities.KubeVersion.Minor | replace "+" "")`
148+
`initContainers.waitForRedis.securityContext.enabled` | enable Kubernetes security context on container | `true`
149+
`initContainers.waitForRedis.timeout` | number of seconds | 180
148150
`livenessProbe.enabled` | enable Kubernetes livenessProbe. Disable to use oauth2-proxy with Istio mTLS. See [Istio FAQ](https://istio.io/help/faq/security/#k8s-health-checks) | `true`
149151
`livenessProbe.initialDelaySeconds` | number of seconds | 0
150152
`livenessProbe.timeoutSeconds` | number of seconds | 1

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,12 @@ spec:
6565
- wait
6666
- pod/{{ include "oauth2-proxy.redis.fullname" . }}-master-0
6767
- --for=condition=ready
68-
- --timeout=180s
68+
- --timeout={{ .Values.initContainers.waitForRedis.timeout }}s
69+
{{- if .Values.initContainers.waitForRedis.securityContext.enabled }}
70+
{{- $securityContext := unset .Values.initContainers.waitForRedis.securityContext "enabled" }}
6971
securityContext:
70-
allowPrivilegeEscalation: false
71-
readOnlyRootFilesystem: true
72-
runAsNonRoot: true
73-
runAsUser: 65534
74-
capabilities:
75-
drop:
76-
- ALL
72+
{{- toYaml $securityContext | nindent 10 }}
73+
{{- end }}
7774
{{- end }}
7875
containers:
7976
- name: {{ .Chart.Name }}

helm/oauth2-proxy/values.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,19 @@ initContainers:
276276
# uses the kubernetes version of the cluster
277277
# the chart is deployed on, if not set
278278
kubectlVersion: ""
279+
securityContext:
280+
enabled: true
281+
allowPrivilegeEscalation: false
282+
capabilities:
283+
drop:
284+
- ALL
285+
readOnlyRootFilesystem: true
286+
runAsNonRoot: true
287+
runAsUser: 65534
288+
runAsGroup: 65534
289+
seccompProfile:
290+
type: RuntimeDefault
291+
timeout: 180
279292

280293
# Additionally authenticate against a htpasswd file. Entries must be created with "htpasswd -B" for bcrypt encryption.
281294
# Alternatively supply an existing secret which contains the required information.

0 commit comments

Comments
 (0)