Files
cozystack/packages/apps/postgres/templates/_tls.tpl
T
Arsolitt f204345e8f feat(postgres): implement TLS in Helm templates
- Add _tls.tpl helper with tri-state resolution logic (nil/false/true)
- Add certmanager.yaml to provision CA and leaf Certificate resources
- Wire TLS listener configuration into db.yaml when TLS is enabled

Signed-off-by: Arsolitt <arsolitt@gmail.com>
2026-05-27 11:26:49 +03:00

18 lines
571 B
Smarty

{{/*
postgres.tls.enabled resolves the tri-state tls.enabled field to a plain
string "true" or "false" so callers can use it with `eq`:
{{- $tlsEnabled := (include "postgres.tls.enabled" .) | eq "true" -}}
Tri-state semantics:
- tls.enabled explicitly set → use that value
- tls.enabled unset (null) → auto-on when external is true
*/}}
{{- define "postgres.tls.enabled" -}}
{{- if kindIs "invalid" .Values.tls.enabled -}}
{{- .Values.external | default false | toString -}}
{{- else -}}
{{- .Values.tls.enabled | toString -}}
{{- end -}}
{{- end -}}