fix minior bug that creates invalid kong DANM dannotation
[it/dep.git] / ric-aux / helm / infrastructure / subcharts / kong / charts / postgresql / templates / initialization-configmap.yaml
1 {{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }}
2 apiVersion: v1
3 kind: ConfigMap
4 metadata:
5   name: {{ template "postgresql.fullname" . }}-init-scripts
6   labels:
7     app: {{ template "postgresql.name" . }}
8     chart: {{ template "postgresql.chart" . }}
9     release: {{ .Release.Name | quote }}
10     heritage: {{ .Release.Service | quote }}
11 {{- with .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }}
12 binaryData:
13 {{- range $path, $bytes := . }}
14   {{ base $path }}: {{ $.Files.Get $path | b64enc | quote }}
15 {{- end }}
16 {{- end }}
17 data:
18 {{- with .Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}" }}
19 {{ .AsConfig | indent 2 }}
20 {{- end }}
21 {{- with .Values.initdbScripts }}
22 {{ toYaml . | indent 2 }}
23 {{- end }}
24 {{- end }}