X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-platform%2F50-RIC-Platform%2Fhelm%2Fkong%2Fcharts%2Fkong%2Fcharts%2Fpostgresql%2Ftemplates%2Finitialization-configmap.yaml;fp=ric-platform%2F50-RIC-Platform%2Fhelm%2Fkong%2Fcharts%2Fkong%2Fcharts%2Fpostgresql%2Ftemplates%2Finitialization-configmap.yaml;h=8eb5e05881f6d1f1eaeb9e0aa0135858745f65b2;hb=c3993d1b897672cba96a53605d0d5d8788518536;hp=0000000000000000000000000000000000000000;hpb=581a3a371b3d0adfb6d9c831ad6877c3e07df0cd;p=it%2Fdep.git diff --git a/ric-platform/50-RIC-Platform/helm/kong/charts/kong/charts/postgresql/templates/initialization-configmap.yaml b/ric-platform/50-RIC-Platform/helm/kong/charts/kong/charts/postgresql/templates/initialization-configmap.yaml new file mode 100755 index 00000000..8eb5e058 --- /dev/null +++ b/ric-platform/50-RIC-Platform/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 }}