mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-22 04:33:36 +09:00
- 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>
18 lines
571 B
Smarty
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 -}}
|