feat: improve template formatting
lint-and-test / lint-helm (push) Successful in 13s
lint-and-test / chart-testing (push) Successful in 25s
release-charts-postgres-cluster / release (push) Successful in 30s
renovate / renovate (push) Successful in 55s

This commit is contained in:
2026-05-17 21:59:53 -05:00
parent 7b9419140b
commit bc2cfeb2a2
7 changed files with 27 additions and 372 deletions
@@ -1,5 +1,5 @@
{{- define "cluster.bootstrap" }}
{{- if eq .Values.mode "standalone" }}
{{- define "cluster.bootstrap" -}}
{{- if eq .Values.mode "standalone" -}}
bootstrap:
initdb:
{{- with .Values.cluster.initdb }}
@@ -18,7 +18,7 @@ bootstrap:
{{- end }}
{{- end }}
{{- end }}
{{- else if eq .Values.mode "recovery" }}
{{- else if eq .Values.mode "recovery" -}}
bootstrap:
{{- if eq .Values.recovery.method "import" }}
initdb:
@@ -55,11 +55,11 @@ bootstrap:
{{- end }}
{{- end }}
schemaOnly: {{ .Values.recovery.import.schemaOnly }}
{{ with .Values.recovery.import.pgDumpExtraOptions }}
{{- with .Values.recovery.import.pgDumpExtraOptions }}
pgDumpExtraOptions:
{{- . | toYaml | nindent 8 }}
{{- end }}
{{ with .Values.recovery.import.pgRestoreExtraOptions }}
{{- with .Values.recovery.import.pgRestoreExtraOptions }}
pgRestoreExtraOptions:
{{- . | toYaml | nindent 8 }}
{{- end }}
@@ -69,10 +69,10 @@ bootstrap:
recoveryTarget:
targetTime: {{ . }}
{{- end }}
{{ with .Values.recovery.backup.database }}
{{- with .Values.recovery.backup.database }}
database: {{ . }}
{{- end }}
{{ with .Values.recovery.backup.owner }}
{{- with .Values.recovery.backup.owner }}
owner: {{ . }}
{{- end }}
backup:
@@ -83,17 +83,17 @@ bootstrap:
recoveryTarget:
targetTime: {{ . }}
{{- end }}
{{ with .Values.recovery.objectStore.database }}
{{- with .Values.recovery.objectStore.database }}
database: {{ . }}
{{- end }}
{{ with .Values.recovery.objectStore.owner }}
{{- with .Values.recovery.objectStore.owner }}
owner: {{ . }}
{{- end }}
source: {{ include "cluster.recoveryServerName" . }}
{{- else }}
{{- else -}}
{{ fail "Invalid recovery mode!" }}
{{- end }}
{{- else }}
{{- end -}}
{{- else -}}
{{ fail "Invalid cluster mode!" }}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}