X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-infra%2F30-Kong%2Fhelm%2Fkong%2Fcharts%2Fkong%2Fcharts%2Fpostgresql%2Ftemplates%2Finitialization-configmap.yaml;fp=ric-infra%2F30-Kong%2Fhelm%2Fkong%2Fcharts%2Fkong%2Fcharts%2Fpostgresql%2Ftemplates%2Finitialization-configmap.yaml;h=8eb5e05881f6d1f1eaeb9e0aa0135858745f65b2;hb=adbdd09e7300845d14107f67034d817286519a40;hp=0000000000000000000000000000000000000000;hpb=67e464c5c70457e37681d96baa79c36b4b26eb3d;p=it%2Fdep.git diff --git a/ric-infra/30-Kong/helm/kong/charts/kong/charts/postgresql/templates/initialization-configmap.yaml b/ric-infra/30-Kong/helm/kong/charts/kong/charts/postgresql/templates/initialization-configmap.yaml new file mode 100755 index 00000000..8eb5e058 --- /dev/null +++ b/ric-infra/30-Kong/helm/kong/charts/kong/charts/postgresql/templates/initialization-configmap.yaml @@ -0,0 +1,24 @@ +{{- 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: + app: {{ template "postgresql.name" . }} + chart: {{ template "postgresql.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- 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 }}