Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support: recovery target variables in helm chart #399

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions charts/cluster/templates/_bootstrap.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,34 @@ externalClusters:

{{- else }}
recovery:
{{- with .Values.recovery.pitrTarget.time }}

recoveryTarget:
{{- with .Values.recovery.pitrTarget.backupID }}
backupID: {{ . }}
{{- end }}
{{- with .Values.recovery.pitrTarget.exclusive }}
exclusive: {{ . }}
{{- end }}
{{- with .Values.recovery.pitrTarget.time }}
targetTime: {{ . }}
{{- end }}
{{- end }}
{{- with .Values.recovery.pitrTarget.xid }}
targetXID: {{ . }}
{{- end }}
{{- with .Values.recovery.pitrTarget.name }}
targetName: {{ . }}
{{- end }}
{{- with .Values.recovery.pitrTarget.lsn }}
targetLSN: {{ . }}
{{- end }}
{{- with .Values.recovery.pitrTarget.immediate }}
targetImmediate: {{ . }}
{{- end }}
{{- with .Values.recovery.pitrTarget.tli }}
targetTLI: {{ . }}
{{- end }}


{{- if eq .Values.recovery.method "backup" }}
backup:
name: {{ .Values.recovery.backupName }}
Expand Down
23 changes: 22 additions & 1 deletion charts/cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,29 @@

## -- Point in time recovery target. Specify one of the following:
pitrTarget:
# -- Time in RFC3339 format
# -- The ID of the backup from which to start the recovery process.

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

View workflow job for this annotation

GitHub Actions / linter

39:72 [trailing-spaces] trailing spaces
# If empty (default) the operator will automatically detect the backup based on `pitrTarget.time` or `pitrTarget.lsn` if provided.
# Otherwise use the latest available backup in chronological order.
backupID: ""

# -- Recovery ends as soon as a consistent state is reached, that is, as early as possible
immediate: ""

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

View workflow job for this annotation

GitHub Actions / linter

46:1 [trailing-spaces] trailing spaces
# -- The target timeline ("latest" or a positive integer)
tli: ""

# -- Set the target to be exclusive. If omitted, defaults to false, so that in Postgres, `recovery_target_inclusive` will be true
exclusive: ""

# Specify EXACTLY ONE of the following options:
# -- Point in time recovery Time target in RFC3339 format
time: ""
# -- Point in time recovery Transaction ID up to which recovery proceeds. (The precise stopping point is also influenced by the exclusive option.)

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

View workflow job for this annotation

GitHub Actions / linter

56:151 [trailing-spaces] trailing spaces
xid: ""
# -- Named restore point (created with pg_create_restore_point()) to which recovery proceeds
name: ""
# -- LSN (Log Sequence Number) of the write-ahead log location up to which recovery proceeds. (The precise stopping point is also influenced by the exclusive option.)
lsn: ""

##
# -- Backup Recovery Method
Expand Down
Loading