Skip to content

Commit

Permalink
re-order and add other supported target recoveries
Browse files Browse the repository at this point in the history
Signed-off-by: sadath-12 <[email protected]>
  • Loading branch information
sadath-12 committed Sep 24, 2024
1 parent 2c572b7 commit b5fd51e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
25 changes: 20 additions & 5 deletions charts/cluster/templates/_bootstrap.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 8 additions & 0 deletions charts/cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.)

Check failure on line 43 in charts/cluster/values.yaml

View workflow job for this annotation

GitHub Actions / linter

43:128 [trailing-spaces] trailing spaces
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
Expand Down

0 comments on commit b5fd51e

Please sign in to comment.