From b5fd51e86ed78e84573f05641c5822e532ec2c4e Mon Sep 17 00:00:00 2001 From: sadath-12 Date: Wed, 25 Sep 2024 00:39:03 +0530 Subject: [PATCH] re-order and add other supported target recoveries Signed-off-by: sadath-12 --- charts/cluster/templates/_bootstrap.tpl | 25 ++++++++++++++++++++----- charts/cluster/values.yaml | 8 ++++++++ 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/charts/cluster/templates/_bootstrap.tpl b/charts/cluster/templates/_bootstrap.tpl index 661f0f389..9ab47ccda 100644 --- a/charts/cluster/templates/_bootstrap.tpl +++ b/charts/cluster/templates/_bootstrap.tpl @@ -71,14 +71,29 @@ externalClusters: {{- else }} recovery: - {{- with .Values.recovery.pitrTarget.targetTime }} + + {{- if or .Values.recovery.pitrTarget.targetTime .Values.recovery.pitrTarget.backupID .Values.recovery.pitrTarget.targetXID .Values.recovery.pitrTarget.targetName .Values.recovery.pitrTarget.targetLSN .Values.recovery.pitrTarget.targetImmediate }} recoveryTarget: + {{- with .Values.recovery.pitrTarget.targetTime }} targetTime: {{ . }} - {{- end }} - {{- with .Values.recovery.pitrTarget.backupID }} - recoveryTarget: + {{- end }} + {{- with .Values.recovery.pitrTarget.backupID }} backupID: {{ . }} - {{- end }} + {{- end }} + {{- with .Values.recovery.pitrTarget.targetXID }} + targetXID: {{ . }} + {{- end }} + {{- with .Values.recovery.pitrTarget.targetName }} + targetName: {{ . }} + {{- end }} + {{- with .Values.recovery.pitrTarget.targetLSN }} + targetLSN: {{ . }} + {{- end }} + {{- with .Values.recovery.pitrTarget.targetImmediate }} + targetImmediate: {{ . }} + {{- end }} + {{- end }} + {{- if eq .Values.recovery.method "backup" }} backup: name: {{ .Values.recovery.backupName }} diff --git a/charts/cluster/values.yaml b/charts/cluster/values.yaml index 232084b37..beab8f7fc 100644 --- a/charts/cluster/values.yaml +++ b/charts/cluster/values.yaml @@ -40,6 +40,14 @@ recovery: targetTime: "" # -- immediate target given a backup id backupID: "" + # -- Transaction ID up to which recovery proceeds. (The precise stopping point is also influenced by the exclusive option.) + targetXID: "" + # -- Named restore point (created with pg_create_restore_point()) to which recovery proceeds + targetName: "" + # -- LSN of the write-ahead log location up to which recovery proceeds. (The precise stopping point is also influenced by the exclusive option.) + targetLSN: "" + # -- Recovery ends as soon as a consistent state is reached, that is, as early as possible + targetImmediate: "" ## # -- Backup Recovery Method