mirror of
https://github.com/bitnami/charts.git
synced 2026-03-06 06:49:59 +08:00
* [bitnami/postgresql] Add option to add annotations to all generated resources * Add to readme * [bitnami/postgresql] Update components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Co-authored-by: Bitnami Containers <containers@bitnami.com>
30 lines
1.2 KiB
YAML
30 lines
1.2 KiB
YAML
{{ if and (or (.Files.Glob "files/postgresql.conf") (.Files.Glob "files/pg_hba.conf") .Values.postgresqlConfiguration .Values.pgHbaConfiguration) (not .Values.configurationConfigMap) }}
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ template "postgresql.fullname" . }}-configuration
|
|
labels:
|
|
app: {{ template "postgresql.name" . }}
|
|
chart: {{ template "postgresql.chart" . }}
|
|
release: {{ .Release.Name | quote }}
|
|
heritage: {{ .Release.Service | quote }}
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "postgresql.tplValue" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
data:
|
|
{{- if (.Files.Glob "files/postgresql.conf") }}
|
|
{{ (.Files.Glob "files/postgresql.conf").AsConfig | indent 2 }}
|
|
{{- else if .Values.postgresqlConfiguration }}
|
|
postgresql.conf: |
|
|
{{- range $key, $value := default dict .Values.postgresqlConfiguration }}
|
|
{{ $key | snakecase }}={{ $value }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if (.Files.Glob "files/pg_hba.conf") }}
|
|
{{ (.Files.Glob "files/pg_hba.conf").AsConfig | indent 2 }}
|
|
{{- else if .Values.pgHbaConfiguration }}
|
|
pg_hba.conf: |
|
|
{{ .Values.pgHbaConfiguration | indent 4 }}
|
|
{{- end }}
|
|
{{ end }}
|