6969 type: object
7070 spec:
7171 properties:
72+ method:
73+ default: pgbackrest
74+ description: Method with which to perform the backup
75+ enum:
76+ - pgbackrest
77+ - volumeSnapshot
78+ type: string
7279 options:
7380 description: |-
7481 Command line options to include when running the pgBackRest backup command.
@@ -79,14 +86,17 @@ spec:
7986 pgCluster:
8087 type: string
8188 repoName:
82- description: The name of the pgBackRest repo to run the backup command
83- against.
89+ description: |-
90+ The name of the pgBackRest repo to run the backup command against.
91+ This is required when method is 'pgbackrest'.
8492 pattern: ^repo[1-4]
8593 type: string
8694 required:
8795 - pgCluster
88- - repoName
8996 type: object
97+ x-kubernetes-validations:
98+ - message: repoName is required when method is 'pgbackrest'
99+ rule: self.method == "volumeSnapshot" || has(self.repoName)
90100 status:
91101 properties:
92102 backupName:
@@ -390,6 +400,24 @@ spec:
390400 required:
391401 - name
392402 type: object
403+ snapshot:
404+ properties:
405+ dataVolumeSnapshotRef:
406+ description: Name of the VolumeSnapshot containing data volume
407+ contents.
408+ type: string
409+ tablespaceVolumeSnapshotRefs:
410+ additionalProperties:
411+ type: string
412+ description: |-
413+ Names of the VolumeSnapshots containing tablespace volume contents.
414+ Key is the name of the tablespace, value is the name of the VolumeSnapshot.
415+ type: object
416+ walVolumeSnapshotRef:
417+ description: Name of the VolumeSnapshot containing WAL volume
418+ contents.
419+ type: string
420+ type: object
393421 state:
394422 type: string
395423 storageType:
@@ -7515,6 +7543,51 @@ spec:
75157543 trackLatestRestorableTime:
75167544 description: Enable tracking latest restorable time
75177545 type: boolean
7546+ volumeSnapshots:
7547+ description: VolumeSnapshots configuration
7548+ properties:
7549+ className:
7550+ description: Name of the VolumeSnapshotClass to use.
7551+ type: string
7552+ mode:
7553+ default: offline
7554+ description: Mode of the VolumeSnapshot.
7555+ enum:
7556+ - offline
7557+ type: string
7558+ offlineConfig:
7559+ description: |-
7560+ Configuration for offline snapshot operations.
7561+ Ignored if mode is not offline.
7562+ properties:
7563+ checkpoint:
7564+ description: Checkpoint configuration for offline snapshot
7565+ operations.
7566+ properties:
7567+ enabled:
7568+ default: true
7569+ description: If set, a checkpoint is requested.
7570+ type: boolean
7571+ timeoutSeconds:
7572+ default: 300
7573+ description: |-
7574+ Timeout for the checkpoint operation.
7575+ Ignored if checkpoint is not enabled.
7576+ format: int32
7577+ minimum: 30
7578+ type: integer
7579+ type: object
7580+ type: object
7581+ schedule:
7582+ description: |-
7583+ Defines the Cron schedule for a VolumeSnapshot.
7584+ Follows the standard Cron schedule syntax:
7585+ https://k8s.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntax
7586+ minLength: 6
7587+ type: string
7588+ required:
7589+ - className
7590+ type: object
75187591 type: object
75197592 x-kubernetes-validations:
75207593 - message: At least one repository must be configured when backups
@@ -21968,17 +22041,33 @@ spec:
2196822041 pgCluster:
2196922042 description: The name of the PerconaPGCluster to perform restore.
2197022043 type: string
22044+ x-kubernetes-validations:
22045+ - message: pgCluster is an immutable field
22046+ rule: self == oldSelf
2197122047 repoName:
2197222048 description: |-
2197322049 The name of the pgBackRest repo within the source PostgresCluster that contains the backups
2197422050 that should be utilized to perform a pgBackRest restore when initializing the data source
2197522051 for the new PostgresCluster.
2197622052 pattern: ^repo[1-4]
2197722053 type: string
22054+ x-kubernetes-validations:
22055+ - message: repoName is an immutable field
22056+ rule: self == oldSelf
22057+ volumeSnapshotBackupName:
22058+ description: The name of the backup to perform in-place volume snapshot
22059+ restores from.
22060+ type: string
22061+ x-kubernetes-validations:
22062+ - message: volumeSnapshotBackupName is an immutable field
22063+ rule: self == oldSelf
2197822064 required:
2197922065 - pgCluster
21980- - repoName
2198122066 type: object
22067+ x-kubernetes-validations:
22068+ - message: either repoName or volumeSnapshotBackupName must be set
22069+ rule: ((has(self.repoName) && self.repoName != "") || (has(self.volumeSnapshotBackupName)
22070+ && self.volumeSnapshotBackupName != ""))
2198222071 status:
2198322072 properties:
2198422073 completed:
0 commit comments