1 {{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }}
5 name: {{ template "postgresql.fullname" . }}-init-scripts
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" }}
13 {{- range $path, $bytes := . }}
14 {{ base $path }}: {{ $.Files.Get $path | b64enc | quote }}
18 {{- with .Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}" }}
19 {{ .AsConfig | indent 2 }}
21 {{- with .Values.initdbScripts }}
22 {{ toYaml . | indent 2 }}