From 3bb6043ec8927c4df8c0120b7b7cc2095ea8f626 Mon Sep 17 00:00:00 2001 From: juan131 Date: Wed, 19 Dec 2018 11:23:42 +0100 Subject: [PATCH] [bitnami/mysql] Allow including gzip files as initdb scripts Signed-off-by: juan131 --- bitnami/mysql/Chart.yaml | 2 +- bitnami/mysql/README.md | 2 +- bitnami/mysql/templates/initialization-configmap.yaml | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/bitnami/mysql/Chart.yaml b/bitnami/mysql/Chart.yaml index 71fc05c6cd..ab11a50939 100644 --- a/bitnami/mysql/Chart.yaml +++ b/bitnami/mysql/Chart.yaml @@ -1,5 +1,5 @@ name: mysql -version: 4.2.1 +version: 4.2.2 appVersion: 5.7.24 description: Chart to create a Highly available MySQL cluster keywords: diff --git a/bitnami/mysql/README.md b/bitnami/mysql/README.md index 4481e79343..1e1c6db817 100644 --- a/bitnami/mysql/README.md +++ b/bitnami/mysql/README.md @@ -16,7 +16,7 @@ Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment ## Prerequisites -- Kubernetes 1.4+ with Beta APIs enabled +- Kubernetes 1.10+ - PV provisioner support in the underlying infrastructure ## Installing the Chart diff --git a/bitnami/mysql/templates/initialization-configmap.yaml b/bitnami/mysql/templates/initialization-configmap.yaml index 1e6bf0ddb4..3db8f2298d 100644 --- a/bitnami/mysql/templates/initialization-configmap.yaml +++ b/bitnami/mysql/templates/initialization-configmap.yaml @@ -1,4 +1,4 @@ -{{ if (.Files.Glob "files/docker-entrypoint-initdb.d/*[sh|sql|sql.gz]") }} +{{- if (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") }} apiVersion: v1 kind: ConfigMap metadata: @@ -9,6 +9,11 @@ metadata: chart: {{ template "mysql.chart" . }} release: {{ .Release.Name | quote }} heritage: {{ .Release.Service | quote }} +binaryData: +{{- $root := . }} +{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} + {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} +{{- end }} data: -{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*[sh|sql|sql.gz]").AsConfig | indent 2 }} -{{ end }} \ No newline at end of file +{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} +{{- end }}