Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
Add securityContext (#2571)
Browse files Browse the repository at this point in the history
* Update Chart.yaml

* Update apiserver-deployment.yaml

* Update controller-manager-deployment.yaml

* Update values.yaml

* Update Chart.yaml

go back to previous version as requested by reviewer
  • Loading branch information
obeyler authored and k8s-ci-robot committed Mar 5, 2019
1 parent 49e5cc4 commit f627697
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/catalog/templates/apiserver-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ spec:
{{ toYaml .Values.apiserver.annotations | indent 8 }}
{{- end }}
spec:
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
{{- end }}
serviceAccountName: "{{ .Values.apiserver.serviceAccount }}"
containers:
- name: apiserver
Expand Down
4 changes: 4 additions & 0 deletions charts/catalog/templates/controller-manager-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ spec:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
{{- end }}
serviceAccountName: "{{ .Values.controllerManager.serviceAccount }}"
containers:
- name: controller-manager
Expand Down
4 changes: 4 additions & 0 deletions charts/catalog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,7 @@ asyncBindingOperationsEnabled: false
namespacedServiceBrokerDisabled: false
# Whether the ServicePlanDefaults alpha feature should be enabled
servicePlanDefaultsEnabled: false
## Security context give the opportunity to run container as nonroot by setting a securityContext
## by example :
## securityContext: { runAsUser: 1001 }
securityContext: {}

0 comments on commit f627697

Please sign in to comment.