Skip to content

Commit 1d03987

Browse files
committed
feat(#727): add container and pod security context configuration via values
1 parent fe724c2 commit 1d03987

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

charts/cluster/templates/cluster.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,16 @@ spec:
115115
{{- toYaml . | nindent 4 }}
116116
{{- end }}
117117

118+
{{- with .Values.cluster.podSecurityContext }}
119+
podSecurityContext:
120+
{{- toYaml . | nindent 4 }}
121+
{{ end }}
122+
123+
{{- with .Values.cluster.securityContext }}
124+
securityContext:
125+
{{- toYaml . | nindent 4 }}
126+
{{ end }}
127+
118128
monitoring:
119129
enablePodMonitor: {{ and .Values.cluster.monitoring.enabled .Values.cluster.monitoring.podMonitor.enabled }}
120130
disableDefaultQueries: {{ .Values.cluster.monitoring.disableDefaultQueries }}

charts/cluster/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,14 @@ cluster:
391391
# -- Configure the metadata of the generated service account
392392
serviceAccountTemplate: {}
393393

394+
# -- Configure the Pod Security Context.
395+
# See: https://cloudnative-pg.io/documentation/preview/security/
396+
podSecurityContext: {}
397+
398+
# -- Configure Container Security Context.
399+
# See: https://cloudnative-pg.io/documentation/preview/security/
400+
securityContext: {}
401+
394402
additionalLabels: {}
395403
annotations: {}
396404

0 commit comments

Comments
 (0)