porthole/charts/mysqlclient-utility/templates/configmap-bin.yaml
Huang, Sophie (sh879n) b597e0addc Add the capability to create a test database
In this patchset, if configured to do so, a test database with
a table and a couple of rows in the table is created at bootstrap time
of the mysqlclient utility container.
The test database will be created for each of the Mariadb DBs in the
mariadb backup restore enabled namespaces.

Change-Id: I3afb85debfafde0585abd726fe8b2f999f590294
2020-06-29 14:58:27 +00:00

61 lines
2.0 KiB
YAML

{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.manifests.configmap_bin }}
{{- $envAll := . }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-%s" $envAll.Release.Name "bin" }}
data:
{{- if .Values.images.local_registry.active }}
image-repo-sync.sh: |
{{- include "helm-toolkit.scripts.image_repo_sync" . | indent 4 }}
{{- end }}
start.sh: |
{{ tuple "bin/_start.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
mysqlclient-utility-rootwrap: |
{{ tuple "bin/utility/_mysqlclient-utility-rootwrap.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-%s" $envAll.Release.Name "bin-utilscli" }}
data:
utilscli: |
{{ tuple "bin/utility/_utilscli.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
mariadb-ondemand-job.sh: |
{{ tuple "bin/utility/_mariadb_ondemand_job.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
dbutils: |
{{ tuple "bin/utility/_dbutils.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
mysqlutils.sh: |
{{ tuple "bin/utility/_mysqlutils.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- if .Values.manifests.create_test_database }}
create_test_database.sh: |
{{ tuple "bin/utility/_create_test_database.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
bootstrap.sh: |
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}