diff --git a/.wordlist-en-custom.txt b/.wordlist-en-custom.txt index 651bf62d36..d49fb2e636 100644 --- a/.wordlist-en-custom.txt +++ b/.wordlist-en-custom.txt @@ -21,7 +21,6 @@ BackupConfiguration BackupList BackupMethod BackupPhase -BackupSnapshotConfig BackupSnapshotStatus BackupSource BackupSpec @@ -370,6 +369,7 @@ Valerio VirtualBox VolumeSnapshot VolumeSnapshotClass +VolumeSnapshotConfiguration WAL WAL's WALBackupConfiguration @@ -990,7 +990,6 @@ virtualxid volumeMode volumeMounts volumeSnapshot -volumeSnapshotTemplate volumesnapshot wal walSegmentSize diff --git a/api/v1/backup_types.go b/api/v1/backup_types.go index 1f7acd0615..d04a29c822 100644 --- a/api/v1/backup_types.go +++ b/api/v1/backup_types.go @@ -50,9 +50,9 @@ const ( type BackupMethod string const ( - // BackupMethodVolumeSnapshotTemplate means using the volume snapshot + // BackupMethodVolumeSnapshot means using the volume snapshot // Kubernetes feature - BackupMethodVolumeSnapshotTemplate BackupMethod = "volumeSnapshotTemplate" + BackupMethodVolumeSnapshot BackupMethod = "volumeSnapshot" // BackupMethodBarmanObjectStore means using barman to backup the // PostgreSQL cluster @@ -74,13 +74,13 @@ type BackupSpec struct { Target BackupTarget `json:"target,omitempty"` // The backup method to be used, possible options are `barmanObjectStore` - // and `volumeSnapshotTemplate`. Defaults to: `barmanObjectStore`. - // +kubebuilder:validation:Enum=barmanObjectStore;volumeSnapshotTemplate + // and `volumeSnapshot`. Defaults to: `barmanObjectStore`. + // +kubebuilder:validation:Enum=barmanObjectStore;volumeSnapshot // +kubebuilder:default:=barmanObjectStore Method BackupMethod `json:"method,omitempty"` } -// BackupSnapshotStatus the fields exclusive to the volumeSnapshotTemplate method backup +// BackupSnapshotStatus the fields exclusive to the volumeSnapshot method backup type BackupSnapshotStatus struct { // The snapshot lists, populated if it is a snapshot type backup Snapshots []string `json:"snapshots,omitempty"` diff --git a/api/v1/cluster_types.go b/api/v1/cluster_types.go index 44637a9738..4930e22169 100644 --- a/api/v1/cluster_types.go +++ b/api/v1/cluster_types.go @@ -128,8 +128,8 @@ const ( SnapshotOwnerReferenceCluster SnapshotOwnerReference = "cluster" ) -// BackupSnapshotConfig represents the configuration for the execution of snapshot backups. -type BackupSnapshotConfig struct { +// VolumeSnapshotConfiguration represents the configuration for the execution of snapshot backups. +type VolumeSnapshotConfiguration struct { // Labels are key-value pairs that will be added to .metadata.labels snapshot resources. Labels map[string]string `json:"labels,omitempty"` // Annotations key-value pairs that will be added to .metadata.annotations snapshot resources. @@ -1531,12 +1531,12 @@ type BarmanObjectStoreConfiguration struct { } // BackupConfiguration defines how the backup of the cluster are taken. -// The supported backup methods are BarmanObjectStore and VolumeSnapshotTemplate. +// The supported backup methods are BarmanObjectStore and VolumeSnapshot. // For details and examples refer to the Backup and Recovery section of the // documentation type BackupConfiguration struct { - // VolumeSnapshotTemplate provides the configuration for the execution of volume snapshot backups. - VolumeSnapshotTemplate *BackupSnapshotConfig `json:"volumeSnapshotTemplate,omitempty"` + // VolumeSnapshot provides the configuration for the execution of volume snapshot backups. + VolumeSnapshot *VolumeSnapshotConfiguration `json:"volumeSnapshot,omitempty"` // The configuration for the barman-cloud tool suite BarmanObjectStore *BarmanObjectStoreConfiguration `json:"barmanObjectStore,omitempty"` diff --git a/api/v1/scheduledbackup_types.go b/api/v1/scheduledbackup_types.go index 09613fea28..526a5b8118 100644 --- a/api/v1/scheduledbackup_types.go +++ b/api/v1/scheduledbackup_types.go @@ -57,8 +57,8 @@ type ScheduledBackupSpec struct { Target BackupTarget `json:"target,omitempty"` // The backup method to be used, possible options are `barmanObjectStore` - // and `volumeSnapshotTemplate`. Defaults to: `barmanObjectStore`. - // +kubebuilder:validation:Enum=barmanObjectStore;volumeSnapshotTemplate + // and `volumeSnapshot`. Defaults to: `barmanObjectStore`. + // +kubebuilder:validation:Enum=barmanObjectStore;volumeSnapshot // +kubebuilder:default:=barmanObjectStore Method BackupMethod `json:"method,omitempty"` } diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index b34034123d..02787f8c78 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -143,9 +143,9 @@ func (in *Backup) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BackupConfiguration) DeepCopyInto(out *BackupConfiguration) { *out = *in - if in.VolumeSnapshotTemplate != nil { - in, out := &in.VolumeSnapshotTemplate, &out.VolumeSnapshotTemplate - *out = new(BackupSnapshotConfig) + if in.VolumeSnapshot != nil { + in, out := &in.VolumeSnapshot, &out.VolumeSnapshot + *out = new(VolumeSnapshotConfiguration) (*in).DeepCopyInto(*out) } if in.BarmanObjectStore != nil { @@ -197,35 +197,6 @@ func (in *BackupList) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BackupSnapshotConfig) DeepCopyInto(out *BackupSnapshotConfig) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSnapshotConfig. -func (in *BackupSnapshotConfig) DeepCopy() *BackupSnapshotConfig { - if in == nil { - return nil - } - out := new(BackupSnapshotConfig) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BackupSnapshotStatus) DeepCopyInto(out *BackupSnapshotStatus) { *out = *in @@ -2118,6 +2089,35 @@ func (in *Topology) DeepCopy() *Topology { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotConfiguration) DeepCopyInto(out *VolumeSnapshotConfiguration) { + *out = *in + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotConfiguration. +func (in *VolumeSnapshotConfiguration) DeepCopy() *VolumeSnapshotConfiguration { + if in == nil { + return nil + } + out := new(VolumeSnapshotConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WalBackupConfiguration) DeepCopyInto(out *WalBackupConfiguration) { *out = *in diff --git a/config/crd/bases/postgresql.cnpg.io_backups.yaml b/config/crd/bases/postgresql.cnpg.io_backups.yaml index 3d6a6a38ff..a40e206539 100644 --- a/config/crd/bases/postgresql.cnpg.io_backups.yaml +++ b/config/crd/bases/postgresql.cnpg.io_backups.yaml @@ -60,10 +60,10 @@ spec: method: default: barmanObjectStore description: 'The backup method to be used, possible options are `barmanObjectStore` - and `volumeSnapshotTemplate`. Defaults to: `barmanObjectStore`.' + and `volumeSnapshot`. Defaults to: `barmanObjectStore`.' enum: - barmanObjectStore - - volumeSnapshotTemplate + - volumeSnapshot type: string target: description: The policy to decide which instance should perform this diff --git a/config/crd/bases/postgresql.cnpg.io_clusters.yaml b/config/crd/bases/postgresql.cnpg.io_clusters.yaml index b5e1967432..356f9da8f0 100644 --- a/config/crd/bases/postgresql.cnpg.io_clusters.yaml +++ b/config/crd/bases/postgresql.cnpg.io_clusters.yaml @@ -1242,9 +1242,9 @@ spec: - primary - prefer-standby type: string - volumeSnapshotTemplate: - description: VolumeSnapshotTemplate provides the configuration - for the execution of volume snapshot backups. + volumeSnapshot: + description: VolumeSnapshot provides the configuration for the + execution of volume snapshot backups. properties: annotations: additionalProperties: diff --git a/config/crd/bases/postgresql.cnpg.io_scheduledbackups.yaml b/config/crd/bases/postgresql.cnpg.io_scheduledbackups.yaml index adfcff91ec..f31ac5de98 100644 --- a/config/crd/bases/postgresql.cnpg.io_scheduledbackups.yaml +++ b/config/crd/bases/postgresql.cnpg.io_scheduledbackups.yaml @@ -73,10 +73,10 @@ spec: method: default: barmanObjectStore description: 'The backup method to be used, possible options are `barmanObjectStore` - and `volumeSnapshotTemplate`. Defaults to: `barmanObjectStore`.' + and `volumeSnapshot`. Defaults to: `barmanObjectStore`.' enum: - barmanObjectStore - - volumeSnapshotTemplate + - volumeSnapshot type: string schedule: description: The schedule does not follow the same format used in diff --git a/controllers/backup_controller.go b/controllers/backup_controller.go index 122b12255f..06d578f818 100644 --- a/controllers/backup_controller.go +++ b/controllers/backup_controller.go @@ -210,10 +210,10 @@ func (r *BackupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr tryFlagBackupAsFailed(ctx, r.Client, &backup, fmt.Errorf("encountered an error while taking the backup: %w", err)) return ctrl.Result{}, nil } - case apiv1.BackupMethodVolumeSnapshotTemplate: - if cluster.Spec.Backup.VolumeSnapshotTemplate == nil { + case apiv1.BackupMethodVolumeSnapshot: + if cluster.Spec.Backup.VolumeSnapshot == nil { tryFlagBackupAsFailed(ctx, r.Client, &backup, - errors.New("no volumeSnapshotTemplate section defined on the target cluster")) + errors.New("no volumeSnapshot section defined on the target cluster")) return ctrl.Result{}, nil } if err := startSnapshotBackup(ctx, r.Client, pod, &cluster, &backup); err != nil { @@ -239,7 +239,7 @@ func startSnapshotBackup( ) error { contextLogger := log.FromContext(ctx) - backup.Status.SetAsStarted(targetPod, apiv1.BackupMethodVolumeSnapshotTemplate) + backup.Status.SetAsStarted(targetPod, apiv1.BackupMethodVolumeSnapshot) if err := postgres.PatchBackupStatusAndRetry(ctx, cli, backup); err != nil { return err } @@ -253,7 +253,7 @@ func startSnapshotBackup( return fmt.Errorf("cannot get PVCs: %w", err) } - snapshotConfig := *cluster.Spec.Backup.VolumeSnapshotTemplate + snapshotConfig := *cluster.Spec.Backup.VolumeSnapshot snapshotEnrich := func(vs *storagesnapshotv1.VolumeSnapshot) { switch snapshotConfig.SnapshotOwnerReference { diff --git a/docs/src/api_reference.md b/docs/src/api_reference.md index c6650d615d..5dd0706e26 100644 --- a/docs/src/api_reference.md +++ b/docs/src/api_reference.md @@ -23,7 +23,6 @@ Below you will find a description of the defined resources: - [Backup](#Backup) - [BackupConfiguration](#BackupConfiguration) - [BackupList](#BackupList) -- [BackupSnapshotConfig](#BackupSnapshotConfig) - [BackupSnapshotStatus](#BackupSnapshotStatus) - [BackupSource](#BackupSource) - [BackupSpec](#BackupSpec) @@ -92,6 +91,7 @@ Below you will find a description of the defined resources: - [StorageConfiguration](#StorageConfiguration) - [SyncReplicaElectionConstraints](#SyncReplicaElectionConstraints) - [Topology](#Topology) +- [VolumeSnapshotConfiguration](#VolumeSnapshotConfiguration) - [WalBackupConfiguration](#WalBackupConfiguration) @@ -146,14 +146,14 @@ Name | Description ## BackupConfiguration -BackupConfiguration defines how the backup of the cluster are taken. The supported backup methods are BarmanObjectStore and VolumeSnapshotTemplate. For details and examples refer to the Backup and Recovery section of the documentation +BackupConfiguration defines how the backup of the cluster are taken. The supported backup methods are BarmanObjectStore and VolumeSnapshot. For details and examples refer to the Backup and Recovery section of the documentation -Name | Description | Type ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ -`volumeSnapshotTemplate` | VolumeSnapshotTemplate provides the configuration for the execution of volume snapshot backups. | [*BackupSnapshotConfig](#BackupSnapshotConfig) -`barmanObjectStore ` | The configuration for the barman-cloud tool suite | [*BarmanObjectStoreConfiguration](#BarmanObjectStoreConfiguration) -`retentionPolicy ` | 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. | string -`target ` | The policy to decide which instance should perform backups. Available options are empty string, which will default to `prefer-standby` policy, `primary` to have backups run always on primary instances, `prefer-standby` to have backups run preferably on the most updated standby, if available. | BackupTarget +Name | Description | Type +----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ +`volumeSnapshot ` | VolumeSnapshot provides the configuration for the execution of volume snapshot backups. | [*VolumeSnapshotConfiguration](#VolumeSnapshotConfiguration) +`barmanObjectStore` | The configuration for the barman-cloud tool suite | [*BarmanObjectStoreConfiguration](#BarmanObjectStoreConfiguration) +`retentionPolicy ` | 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. | string +`target ` | The policy to decide which instance should perform backups. Available options are empty string, which will default to `prefer-standby` policy, `primary` to have backups run always on primary instances, `prefer-standby` to have backups run preferably on the most updated standby, if available. | BackupTarget @@ -166,25 +166,11 @@ Name | Description `metadata` | Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [metav1.ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#listmeta-v1-meta) `items ` | List of backups - *mandatory* | [[]Backup](#Backup) - - -## BackupSnapshotConfig - -BackupSnapshotConfig represents the configuration for the execution of snapshot backups. - -Name | Description | Type ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- -`labels ` | Labels are key-value pairs that will be added to .metadata.labels snapshot resources. | map[string]string -`annotations ` | Annotations key-value pairs that will be added to .metadata.annotations snapshot resources. | map[string]string -`className ` | 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 | string -`walClassName ` | WalClassName specifies the Snapshot Class to be used for the PG_WAL PersistentVolumeClaim. | string -`snapshotOwnerReference` | SnapshotOwnerReference indicates the type of owner reference the snapshot should have. . | SnapshotOwnerReference - ## BackupSnapshotStatus -BackupSnapshotStatus the fields exclusive to the volumeSnapshotTemplate method backup +BackupSnapshotStatus the fields exclusive to the volumeSnapshot method backup Name | Description | Type --------- | ------------------------------------------------------------- | -------- @@ -210,7 +196,7 @@ Name | Description ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------- `cluster` | The cluster to backup | [LocalObjectReference](#LocalObjectReference) `target ` | 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. | BackupTarget -`method ` | The backup method to be used, possible options are `barmanObjectStore` and `volumeSnapshotTemplate`. Defaults to: `barmanObjectStore`. | BackupMethod +`method ` | The backup method to be used, possible options are `barmanObjectStore` and `volumeSnapshot`. Defaults to: `barmanObjectStore`. | BackupMethod @@ -1029,7 +1015,7 @@ Name | Description `cluster ` | The cluster to backup | [LocalObjectReference](#LocalObjectReference) `backupOwnerReference` | Indicates which ownerReference should be put inside the created backup resources.
- none: no owner reference for created backup objects (same behavior as before the field was introduced)
- self: sets the Scheduled backup object as owner of the backup
- cluster: set the cluster as owner of the backup
| string `target ` | 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. | BackupTarget -`method ` | The backup method to be used, possible options are `barmanObjectStore` and `volumeSnapshotTemplate`. Defaults to: `barmanObjectStore`. | BackupMethod +`method ` | The backup method to be used, possible options are `barmanObjectStore` and `volumeSnapshot`. Defaults to: `barmanObjectStore`. | BackupMethod @@ -1133,6 +1119,20 @@ Name | Description `nodesUsed ` | NodesUsed represents the count of distinct nodes accommodating the instances. A value of '1' suggests that all instances are hosted on a single node, implying the absence of High Availability (HA). Ideally, this value should be the same as the number of instances in the Postgres HA cluster, implying shared nothing architecture on the compute side. | int32 `successfullyExtracted` | SuccessfullyExtracted indicates if the topology data was extract. It is useful to enact fallback behaviors in synchronous replica election in case of failures | bool + + +## VolumeSnapshotConfiguration + +VolumeSnapshotConfiguration represents the configuration for the execution of snapshot backups. + +Name | Description | Type +---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- +`labels ` | Labels are key-value pairs that will be added to .metadata.labels snapshot resources. | map[string]string +`annotations ` | Annotations key-value pairs that will be added to .metadata.annotations snapshot resources. | map[string]string +`className ` | 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 | string +`walClassName ` | WalClassName specifies the Snapshot Class to be used for the PG_WAL PersistentVolumeClaim. | string +`snapshotOwnerReference` | SnapshotOwnerReference indicates the type of owner reference the snapshot should have. . | SnapshotOwnerReference + ## WalBackupConfiguration diff --git a/internal/cmd/plugin/backup/cmd.go b/internal/cmd/plugin/backup/cmd.go index f8e6358900..d32590a447 100644 --- a/internal/cmd/plugin/backup/cmd.go +++ b/internal/cmd/plugin/backup/cmd.go @@ -74,7 +74,7 @@ func NewCmd() *cobra.Command { allowedBackupMethods := []string{ "", string(apiv1.BackupMethodBarmanObjectStore), - string(apiv1.BackupMethodVolumeSnapshotTemplate), + string(apiv1.BackupMethodVolumeSnapshot), } if !slices.Contains(allowedBackupMethods, backupMethod) { return fmt.Errorf("backup-method: %s is not supported by the backup command", backupMethod) @@ -112,7 +112,7 @@ func NewCmd() *cobra.Command { "m", "", "If present, will override the backup method defined in backup resource, "+ - "valid values are volumeSnapshotTemplate and barmanObjectStore.", + "valid values are volumeSnapshot and barmanObjectStore.", ) return backupSubcommand diff --git a/internal/cmd/plugin/snapshot/cmd.go b/internal/cmd/plugin/snapshot/cmd.go index 0ae8cc4f5c..fc6583bc11 100644 --- a/internal/cmd/plugin/snapshot/cmd.go +++ b/internal/cmd/plugin/snapshot/cmd.go @@ -121,7 +121,7 @@ func execute( return fmt.Errorf("cannot get PVCs: %w", err) } - executor := snapshot.NewExecutorBuilder(plugin.Client, apiv1.BackupSnapshotConfig{ + executor := snapshot.NewExecutorBuilder(plugin.Client, apiv1.VolumeSnapshotConfiguration{ ClassName: snapshotClassName, SnapshotOwnerReference: "none", }). diff --git a/pkg/utils/snapshot/executor.go b/pkg/utils/snapshot/executor.go index e939c0c40c..1f500b3c30 100644 --- a/pkg/utils/snapshot/executor.go +++ b/pkg/utils/snapshot/executor.go @@ -50,7 +50,7 @@ type Executor struct { snapshotSuffix string printAdvancementFunc func(msg string) snapshotEnrichFunc func(vs *storagesnapshotv1.VolumeSnapshot) - snapshotConfig apiv1.BackupSnapshotConfig + snapshotConfig apiv1.VolumeSnapshotConfiguration } // ExecutorBuilder is a struct capable of creating an Executor @@ -59,7 +59,7 @@ type ExecutorBuilder struct { } // NewExecutorBuilder instantiates a new ExecutorBuilder with the minimum required data -func NewExecutorBuilder(cli client.Client, config apiv1.BackupSnapshotConfig) *ExecutorBuilder { +func NewExecutorBuilder(cli client.Client, config apiv1.VolumeSnapshotConfiguration) *ExecutorBuilder { return &ExecutorBuilder{ executor: Executor{ cli: cli, diff --git a/tests/e2e/fixtures/volume_snapshot/declarative-backup-cluster.yaml.template b/tests/e2e/fixtures/volume_snapshot/declarative-backup-cluster.yaml.template index 4ddedc2fca..194b207088 100644 --- a/tests/e2e/fixtures/volume_snapshot/declarative-backup-cluster.yaml.template +++ b/tests/e2e/fixtures/volume_snapshot/declarative-backup-cluster.yaml.template @@ -15,7 +15,7 @@ spec: size: 1Gi backup: - volumeSnapshotTemplate: + volumeSnapshot: className: ${E2E_DEFAULT_VOLUMESNAPSHOT_CLASS} snapshotOwnerReference: cluster annotations: diff --git a/tests/e2e/fixtures/volume_snapshot/declarative-backup.yaml.template b/tests/e2e/fixtures/volume_snapshot/declarative-backup.yaml.template index 80938f5bd6..2572976745 100644 --- a/tests/e2e/fixtures/volume_snapshot/declarative-backup.yaml.template +++ b/tests/e2e/fixtures/volume_snapshot/declarative-backup.yaml.template @@ -3,6 +3,6 @@ kind: Backup metadata: name: cluster-declarative-backup spec: - method: volumeSnapshotTemplate + method: volumeSnapshot cluster: name: cluster-declarative-backup diff --git a/tests/e2e/volume_snapshot_test.go b/tests/e2e/volume_snapshot_test.go index 03f2fa9076..1d0327579e 100644 --- a/tests/e2e/volume_snapshot_test.go +++ b/tests/e2e/volume_snapshot_test.go @@ -354,7 +354,7 @@ var _ = Describe("Verify Volume Snapshot", By("ensuring that the additional labels and annotations are present", func() { for _, item := range snapshotList.Items { - snapshotConfig := clusterToBackup.Spec.Backup.VolumeSnapshotTemplate + snapshotConfig := clusterToBackup.Spec.Backup.VolumeSnapshot Expect(utils.IsMapSubset(item.Annotations, snapshotConfig.Annotations)).To(BeTrue()) Expect(utils.IsMapSubset(item.Labels, snapshotConfig.Labels)).To(BeTrue()) }