diff --git a/stable/mariadb/Chart.yaml b/stable/mariadb/Chart.yaml index 99eb217d2a..47fff6e690 100644 --- a/stable/mariadb/Chart.yaml +++ b/stable/mariadb/Chart.yaml @@ -1,5 +1,5 @@ name: mariadb -version: 5.1.1 +version: 5.1.2 appVersion: 10.1.36 description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. keywords: diff --git a/stable/mariadb/templates/initialization-configmap.yaml b/stable/mariadb/templates/initialization-configmap.yaml index 7bb969627e..f7f74e4344 100644 --- a/stable/mariadb/templates/initialization-configmap.yaml +++ b/stable/mariadb/templates/initialization-configmap.yaml @@ -1,3 +1,4 @@ +{{ if (.Files.Glob "files/docker-entrypoint-initdb.d/*[sh|sql|sql.gz]") }} apiVersion: v1 kind: ConfigMap metadata: @@ -9,4 +10,5 @@ metadata: release: {{ .Release.Name | quote }} heritage: {{ .Release.Service | quote }} data: -{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*").AsConfig | indent 2 }} +{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*[sh|sql|sql.gz]").AsConfig | indent 2 }} +{{ end }} \ No newline at end of file diff --git a/stable/mariadb/templates/master-statefulset.yaml b/stable/mariadb/templates/master-statefulset.yaml index 35b7e9f7ad..e5290b836b 100644 --- a/stable/mariadb/templates/master-statefulset.yaml +++ b/stable/mariadb/templates/master-statefulset.yaml @@ -139,8 +139,10 @@ spec: volumeMounts: - name: data mountPath: /bitnami/mariadb + {{- if (.Files.Glob "files/docker-entrypoint-initdb.d/*[sh|sql|sql.gz]") }} - name: custom-init-scripts mountPath: /docker-entrypoint-initdb.d + {{- end }} {{- if .Values.master.config }} - name: config mountPath: /opt/bitnami/mariadb/conf/my.cnf @@ -180,19 +182,21 @@ spec: {{ toYaml .Values.metrics.resources | indent 10 }} {{- end }} volumes: - {{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} + {{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} - name: {{ .Values.master.persistence.existingClaim }} persistentVolumeClaim: claimName: {{ .Values.master.persistence.existingClaim }} - {{ end }} - {{- if .Values.master.config }} + {{ end }} + {{- if .Values.master.config }} - name: config configMap: name: {{ template "master.fullname" . }} - {{- end }} + {{- end }} + {{- if (.Files.Glob "files/docker-entrypoint-initdb.d/*[sh|sql|sql.gz]") }} - name: custom-init-scripts configMap: name: {{ template "master.fullname" . }}-init-scripts + {{- end }} {{- if .Values.master.persistence.enabled }} volumeClaimTemplates: - metadata: