Mariadb: enable storage ownership management on pod start
This PS enables storage ownership management on pod start, which is required for some PVC providers/provisioners. Change-Id: Idb4bd20104815efb241ed163daddf27f8bd2b559
This commit is contained in:
parent
2d2e10bfb7
commit
b341cc8e9c
@ -40,6 +40,22 @@ spec:
|
||||
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
{{- if .Values.volume.chown_on_start }}
|
||||
- name: mariadb-perms
|
||||
image: {{ .Values.images.tags.mariadb }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
command:
|
||||
- chown
|
||||
- -R
|
||||
- "mysql:mysql"
|
||||
- /var/lib/mysql
|
||||
volumeMounts:
|
||||
- name: mysql-data
|
||||
mountPath: /var/lib/mysql
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: mariadb
|
||||
image: {{ .Values.images.tags.mariadb }}
|
||||
|
@ -53,6 +53,7 @@ dependencies:
|
||||
force_bootstrap: false
|
||||
|
||||
volume:
|
||||
chown_on_start: true
|
||||
enabled: true
|
||||
class_name: general
|
||||
size: 5Gi
|
||||
|
Loading…
Reference in New Issue
Block a user