diff --git a/postgresql.cnpg.io/backup_v1.json b/postgresql.cnpg.io/backup_v1.json index e84708f..d2bbc6c 100644 --- a/postgresql.cnpg.io/backup_v1.json +++ b/postgresql.cnpg.io/backup_v1.json @@ -29,6 +29,15 @@ "type": "object", "additionalProperties": false }, + "method": { + "default": "barmanObjectStore", + "description": "The backup method to be used, possible options are `barmanObjectStore` and `volumeSnapshot`. Defaults to: `barmanObjectStore`.", + "enum": [ + "barmanObjectStore", + "volumeSnapshot" + ], + "type": "string" + }, "target": { "description": "The policy to decide which instance should perform this backup. If empty, it defaults to `cluster.spec.backup.target`. Available options are empty string, `primary` and `prefer-standby`. `primary` to have backups run always on primary instances, `prefer-standby` to have backups run preferably on the most updated standby, if available.", "enum": [ @@ -246,6 +255,10 @@ "type": "object", "additionalProperties": false }, + "method": { + "description": "The backup method being used", + "type": "string" + }, "phase": { "description": "The last backup status", "type": "string" @@ -341,6 +354,36 @@ "description": "The server name on S3, the cluster name is used if this parameter is omitted", "type": "string" }, + "snapshotBackupStatus": { + "description": "Status of the volumeSnapshot backup", + "properties": { + "elements": { + "description": "The elements list, populated with the gathered volume snapshots", + "items": { + "description": "BackupSnapshotElementStatus is a volume snapshot that is part of a volume snapshot method backup", + "properties": { + "name": { + "description": "Name is the snapshot resource name", + "type": "string" + }, + "type": { + "description": "Type is tho role of the snapshot in the cluster, such as PG_DATA and PG_WAL", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, "startedAt": { "description": "When the backup was started", "format": "date-time", diff --git a/postgresql.cnpg.io/cluster_v1.json b/postgresql.cnpg.io/cluster_v1.json index ed3910b..3a94997 100644 --- a/postgresql.cnpg.io/cluster_v1.json +++ b/postgresql.cnpg.io/cluster_v1.json @@ -1084,7 +1084,7 @@ "additionalProperties": false }, "retentionPolicy": { - "description": "RetentionPolicy is the retention policy to be used for backups and WALs (i.e. '60d'). The retention policy is expressed in the form of `XXu` where `XX` is a positive integer and `u` is in `[dwm]` - days, weeks, months.", + "description": "RetentionPolicy is the retention policy to be used for backups and WALs (i.e. '60d'). The retention policy is expressed in the form of `XXu` where `XX` is a positive integer and `u` is in `[dwm]` - days, weeks, months. It's currently only applicable when using the BarmanObjectStore method.", "pattern": "^[1-9][0-9]*[dwm]$", "type": "string" }, @@ -1096,6 +1096,45 @@ "prefer-standby" ], "type": "string" + }, + "volumeSnapshot": { + "description": "VolumeSnapshot provides the configuration for the execution of volume snapshot backups.", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Annotations key-value pairs that will be added to .metadata.annotations snapshot resources.", + "type": "object" + }, + "className": { + "description": "ClassName specifies the Snapshot Class to be used for PG_DATA PersistentVolumeClaim. It is the default class for the other types if no specific class is present", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels are key-value pairs that will be added to .metadata.labels snapshot resources.", + "type": "object" + }, + "snapshotOwnerReference": { + "default": "none", + "description": "SnapshotOwnerReference indicates the type of owner reference the snapshot should have", + "enum": [ + "none", + "cluster", + "backup" + ], + "type": "string" + }, + "walClassName": { + "description": "WalClassName specifies the Snapshot Class to be used for the PG_WAL PersistentVolumeClaim.", + "type": "string" + } + }, + "type": "object", + "additionalProperties": false } }, "type": "object", @@ -1535,8 +1574,8 @@ "type": "string" }, "enableSuperuserAccess": { - "default": true, - "description": "When this option is enabled, the operator will use the `SuperuserSecret` to update the `postgres` user password (if the secret is not present, the operator will automatically create one). When this option is disabled, the operator will ignore the `SuperuserSecret` content, delete it when automatically created, and then blank the password of the `postgres` user by setting it to `NULL`. Enabled by default.", + "default": false, + "description": "When this option is enabled, the operator will use the `SuperuserSecret` to update the `postgres` user password (if the secret is not present, the operator will automatically create one). When this option is disabled, the operator will ignore the `SuperuserSecret` content, delete it when automatically created, and then blank the password of the `postgres` user by setting it to `NULL`. Disabled by default.", "type": "boolean" }, "env": { @@ -2861,14 +2900,22 @@ "additionalProperties": false }, "replicationSlots": { + "default": { + "highAvailability": { + "enabled": true + } + }, "description": "Replication slots management configuration", "properties": { "highAvailability": { + "default": { + "enabled": true + }, "description": "Replication slots for high availability configuration", "properties": { "enabled": { - "default": false, - "description": "If enabled, the operator will automatically manage replication slots on the primary instance and use them in streaming replication connections with all the standby instances that are part of the HA cluster. If disabled (default), the operator will not take advantage of replication slots in streaming connections with the replicas. This feature also controls replication slots in replica cluster, from the designated primary to its cascading replicas. This can only be set at creation time.", + "default": true, + "description": "If enabled (default), the operator will automatically manage replication slots on the primary instance and use them in streaming replication connections with all the standby instances that are part of the HA cluster. If disabled, the operator will not take advantage of replication slots in streaming connections with the replicas. This feature also controls replication slots in replica cluster, from the designated primary to its cascading replicas.", "type": "boolean" }, "slotPrefix": { @@ -3005,9 +3052,9 @@ "type": "object", "additionalProperties": false }, - "smartStopDelay": { + "smartShutdownTimeout": { "default": 180, - "description": "The time in seconds that controls the window of time reserved for the smart shutdown of Postgres to complete. Make sure you reserve enough time for the operator to request a fast shutdown of Postgres (that is: `stopDelay` - `smartStopDelay`).", + "description": "The time in seconds that controls the window of time reserved for the smart shutdown of Postgres to complete. Make sure you reserve enough time for the operator to request a fast shutdown of Postgres (that is: `stopDelay` - `smartShutdownTimeout`).", "format": "int32", "type": "integer" }, diff --git a/postgresql.cnpg.io/scheduledbackup_v1.json b/postgresql.cnpg.io/scheduledbackup_v1.json index 744796d..a19e2c3 100644 --- a/postgresql.cnpg.io/scheduledbackup_v1.json +++ b/postgresql.cnpg.io/scheduledbackup_v1.json @@ -43,6 +43,15 @@ "description": "If the first backup has to be immediately start after creation or not", "type": "boolean" }, + "method": { + "default": "barmanObjectStore", + "description": "The backup method to be used, possible options are `barmanObjectStore` and `volumeSnapshot`. Defaults to: `barmanObjectStore`.", + "enum": [ + "barmanObjectStore", + "volumeSnapshot" + ], + "type": "string" + }, "schedule": { "description": "The schedule does not follow the same format used in Kubernetes CronJobs as it includes an additional seconds specifier, see https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format", "type": "string"