Files
charts/bitnami/postgresql/templates/initialization-configmap.yaml
T
693e7656d1 [bitnami/postgresql] Helm label best practices (#3021)
* [bitnami/postgresql] Add dependency on bitnami common chart

* [bitnami/postgresql] Replace deprecated standard Helm labels

* [bitnami/postgresql] Bump version to 9.0.0

Co-authored-by: Dennis Effing <dennis.effing@codecentric.de>
2020-07-14 12:27:03 +02:00

25 lines
873 B
YAML

{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "postgresql.fullname" . }}-init-scripts
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "postgresql.tplValue" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- with .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }}
binaryData:
{{- range $path, $bytes := . }}
{{ base $path }}: {{ $.Files.Get $path | b64enc | quote }}
{{- end }}
{{- end }}
data:
{{- with .Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}" }}
{{ .AsConfig | indent 2 }}
{{- end }}
{{- with .Values.initdbScripts }}
{{ toYaml . | indent 2 }}
{{- end }}
{{- end }}