[bitnami/mysql] Allow including gzip files as initdb scripts

Signed-off-by: juan131 <juan@bitnami.com>
This commit is contained in:
juan131
2018-12-19 11:23:42 +01:00
parent 4c839c8e3d
commit 3bb6043ec8
3 changed files with 10 additions and 5 deletions

View File

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

View File

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

View File

@@ -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 }}
{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }}
{{- end }}