Merge "Mariadb: enable storage ownership management on pod start"

This commit is contained in:
Zuul 2018-01-18 17:39:33 +00:00 committed by Gerrit Code Review
commit f978b2dbb5
2 changed files with 17 additions and 0 deletions

View File

@ -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 }}

View File

@ -53,6 +53,7 @@ dependencies:
force_bootstrap: false
volume:
chown_on_start: true
enabled: true
class_name: general
size: 5Gi