Skip to content

Commit

Permalink
Feature: Add support for defining custom container securityContext (#68)
Browse files Browse the repository at this point in the history
* Feature: Add support for defining custom container securityContext

* Bump chart version to 5.2.0
  • Loading branch information
rlacko58 authored Feb 7, 2022
1 parent 94f8c3b commit a2a7e73
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helm/oauth2-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: oauth2-proxy
version: 5.1.0
version: 5.2.0
apiVersion: v2
appVersion: 7.2.0
home: https://oauth2-proxy.github.io/oauth2-proxy/
Expand Down
5 changes: 3 additions & 2 deletions helm/oauth2-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ spec:
{{ toYaml .Values.extraVolumeMounts | indent 8 }}
{{- end }}
{{- if .Values.securityContext.enabled }}
{{- $securityContext := unset .Values.securityContext "enabled" }}
securityContext:
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
{{- end}}
{{- toYaml $securityContext | nindent 10 }}
{{- end }}
volumes:
{{- with .Values.config.google }}
{{- if and .adminEmail (or .serviceAccountJson .existingSecret) }}
Expand Down
2 changes: 2 additions & 0 deletions helm/oauth2-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ readinessProbe:
securityContext:
enabled: false
runAsNonRoot: true
# allowPrivilegeEscalation: false
# runAsUser: 2000

podAnnotations: {}
podLabels: {}
Expand Down

0 comments on commit a2a7e73

Please sign in to comment.