Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions charts/pg-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,15 @@ spec:
path: /metrics
port: metrics
scheme: HTTP
{{- with .Values.containerSecurityContext }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
2 changes: 2 additions & 0 deletions charts/pg-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ resources:
cpu: 100m
memory: 20Mi

containerSecurityContext: {}

nodeSelector: {}

tolerations: []
Expand Down
8 changes: 8 additions & 0 deletions charts/psmdb-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,20 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ include "psmdb-operator.fullname" . }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
Expand All @@ -53,11 +57,13 @@ spec:
name: health
command:
- percona-server-mongodb-operator
{{- with .Values.securityContext }}
{{- if .Values.securityContext.readOnlyRootFilesystem }}
volumeMounts:
- name: tmpdir
mountPath: /tmp
{{- end }}
{{- end }}
env:
- name: LOG_STRUCTURED
value: "{{ .Values.logStructured }}"
Expand Down Expand Up @@ -101,8 +107,10 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.securityContext }}
{{- if .Values.securityContext.readOnlyRootFilesystem }}
volumes:
- name: tmpdir
emptyDir: {}
{{- end }}
{{- end }}
Loading