Add templating for pgpool secrets (#25022)

Signed-off-by: Ben Shaner <ben@benshaner.com>
This commit is contained in:
Ben Shaner
2024-04-10 06:40:45 -04:00
committed by GitHub
parent 8b6790e107
commit 3549c8b7ad
4 changed files with 8 additions and 8 deletions

View File

@@ -40,4 +40,4 @@ maintainers:
name: postgresql-ha
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/postgresql-ha
version: 14.0.2
version: 14.0.3

View File

@@ -373,20 +373,20 @@ Return the Pgpool credentials secret.
{{- if .Values.global -}}
{{- if .Values.global.pgpool -}}
{{- if .Values.global.pgpool.existingSecret -}}
{{- printf "%s" .Values.global.pgpool.existingSecret -}}
{{- printf "%s" (tpl .Values.global.pgpool.existingSecret $) -}}
{{- else if .Values.pgpool.existingSecret -}}
{{- printf "%s" .Values.pgpool.existingSecret -}}
{{- printf "%s" (tpl .Values.pgpool.existingSecret $) -}}
{{- else -}}
{{- printf "%s" (include "postgresql-ha.pgpool" .) -}}
{{- end -}}
{{- else if .Values.pgpool.existingSecret -}}
{{- printf "%s" .Values.pgpool.existingSecret -}}
{{- printf "%s" (tpl .Values.pgpool.existingSecret $) -}}
{{- else -}}
{{- printf "%s" (include "postgresql-ha.pgpool" .) -}}
{{- end -}}
{{- else -}}
{{- if .Values.pgpool.existingSecret -}}
{{- printf "%s" .Values.pgpool.existingSecret -}}
{{- printf "%s" (tpl .Values.pgpool.existingSecret $) -}}
{{- else -}}
{{- printf "%s" (include "postgresql-ha.pgpool" .) -}}
{{- end -}}
@@ -658,7 +658,7 @@ Return the path to the CA cert file.
{{- if .Values.pgpool.tls.autoGenerated }}
{{- printf "%s-crt" (include "postgresql-ha.pgpool" .) -}}
{{- else -}}
{{ required "A secret containing TLS certificates is required when TLS is enabled" .Values.pgpool.tls.certificatesSecret }}
{{ required "A secret containing TLS certificates is required when TLS is enabled" (tpl .Values.pgpool.tls.certificatesSecret $) }}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -637,7 +637,7 @@ spec:
{{- if .Values.postgresql.tls.enabled }}
- name: raw-certificates
secret:
secretName: {{ required "A secret containing TLS certificates is required when TLS is enabled" .Values.postgresql.tls.certificatesSecret }}
secretName: {{ required "A secret containing TLS certificates is required when TLS is enabled" (tpl .Values.postgresql.tls.certificatesSecret .) }}
- name: postgresql-certificates
emptyDir: {}
{{- end }}

View File

@@ -592,7 +592,7 @@ spec:
{{- if .Values.postgresql.tls.enabled }}
- name: raw-certificates
secret:
secretName: {{ required "A secret containing TLS certificates is required when TLS is enabled" .Values.postgresql.tls.certificatesSecret }}
secretName: {{ required "A secret containing TLS certificates is required when TLS is enabled" (tpl .Values.postgresql.tls.certificatesSecret .) }}
- name: postgresql-certificates
emptyDir: {}
{{- end }}