Skip to content

Commit 571764b

Browse files
authored
Add podSecurityContext configuration value for setting securityContext at the pod level (#582)
1 parent ffae5a6 commit 571764b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

sapbtp-operator-charts/templates/deployment.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ spec:
3535
{{- end }}
3636
spec:
3737
serviceAccountName: sap-btp-operator
38+
{{- if .Values.manager.podSecurityContext }}
39+
securityContext:
40+
{{- toYaml .Values.manager.podSecurityContext | nindent 8 }}
41+
{{- end }}
3842
containers:
3943
- args:
4044
- --secure-listen-address=0.0.0.0:8443

sapbtp-operator-charts/values.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ manager:
8585
#securityContext:
8686
# runAsNonRoot: true
8787
securityContext: {}
88+
# Example of adding security context for the pod
89+
#podSecurityContext:
90+
# runAsUser: 1000
91+
# runAsNonRoot: true
92+
# fsGroup: 1000
93+
podSecurityContext: {}
8894
health_service:
8995
enabled: false
9096
kubernetesMatchLabels:
@@ -99,4 +105,3 @@ externalImages:
99105
tag: latest
100106
# Option for adding annotations to configmap
101107
# operator_configmap_annotations: {}
102-

0 commit comments

Comments
 (0)