aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/mariadb-galera/templates/statefulset.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/mariadb-galera/templates/statefulset.yaml')
-rw-r--r--kubernetes/common/mariadb-galera/templates/statefulset.yaml18
1 files changed, 16 insertions, 2 deletions
diff --git a/kubernetes/common/mariadb-galera/templates/statefulset.yaml b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
index 70cc0c34bd..66ce8abc6e 100644
--- a/kubernetes/common/mariadb-galera/templates/statefulset.yaml
+++ b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
@@ -55,7 +55,20 @@ spec:
image: {{ include "repositoryGenerator.image.busybox" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
securityContext:
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ - CAP_NET_RAW
+ add:
+ - CHOWN
+ - SYS_CHROOT
+ runAsGroup: {{ .Values.securityContext.group_id }}
+ readOnlyRootFilesystem: false
runAsUser: 0
+ runAsNonRoot: false
+ seccompProfile:
+ type: RuntimeDefault
volumeMounts:
- name: previous-boot
mountPath: /bootstrap
@@ -169,6 +182,7 @@ spec:
successThreshold: {{ .Values.startupProbe.successThreshold }}
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
{{- end }}
+ {{ include "common.containerSecurityContext" . | indent 10 | trim }}
resources: {{ include "common.resources" . | nindent 12 }}
volumeMounts:
- name: previous-boot
@@ -218,7 +232,7 @@ spec:
timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }}
- {{ include "common.containerSecurityContext" . | indent 10 | trim }}
+ securityContext: {{- toYaml .Values.metrics.securityContext | nindent 12 }}
resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
{{- end }}
{{- include "common.imagePullSecrets" . | nindent 6 }}
@@ -266,4 +280,4 @@ spec:
volumeClaimTemplates:
- {{ include "common.PVCTemplate" (dict "dot" . "suffix" "data" "persistenceInfos" .Values.persistence) | indent 6 | trim }}
{{- end }}
-{{- end }} \ No newline at end of file
+{{- end }}