From e5761cab4febb34919b97d44db8f58a666d55ca8 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Thu, 20 Jun 2024 08:59:03 +0200 Subject: [PATCH] replication: add missing VRC name for VGR we need to have VRC name to create the VR, this PR adds a new field to the VGR to pass down the VRC name for the VolumeReplication object. Signed-off-by: Madhu Rajanna --- .../v1alpha1/volumegroupreplication_types.go | 5 +++++ ...tion.storage.openshift.io_volumegroupreplications.yaml | 8 ++++++++ deploy/controller/crds.yaml | 8 ++++++++ 3 files changed, 21 insertions(+) diff --git a/apis/replication.storage/v1alpha1/volumegroupreplication_types.go b/apis/replication.storage/v1alpha1/volumegroupreplication_types.go index 8dd557c45..04aac01cb 100644 --- a/apis/replication.storage/v1alpha1/volumegroupreplication_types.go +++ b/apis/replication.storage/v1alpha1/volumegroupreplication_types.go @@ -27,6 +27,11 @@ type VolumeGroupReplicationSpec struct { // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="volumeGroupReplicationClassName is immutable" VolumeGroupReplicationClassName string `json:"volumeGroupReplicationClassName"` + // volumeReplicationClassName is the volumeReplicationClass name for VolumeReplication object + // +kubebuilder:validation:Required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="volumReplicationClassName is immutable" + VolumeReplicationClassName string `json:"volumeReplicationClassName"` + // Name of the VolumeReplication object created for this volumeGroupReplication // +kubebuilder:validation:Optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="volumeReplicationName is immutable" diff --git a/config/crd/bases/replication.storage.openshift.io_volumegroupreplications.yaml b/config/crd/bases/replication.storage.openshift.io_volumegroupreplications.yaml index fbec1d6bf..d8f5757cb 100644 --- a/config/crd/bases/replication.storage.openshift.io_volumegroupreplications.yaml +++ b/config/crd/bases/replication.storage.openshift.io_volumegroupreplications.yaml @@ -130,6 +130,13 @@ spec: x-kubernetes-validations: - message: volumeGroupReplicationContentName is immutable rule: self == oldSelf + volumeReplicationClassName: + description: volumeReplicationClassName is the volumeReplicationClass + name for VolumeReplication object + type: string + x-kubernetes-validations: + - message: volumReplicationClassName is immutable + rule: self == oldSelf volumeReplicationName: description: Name of the VolumeReplication object created for this volumeGroupReplication @@ -142,6 +149,7 @@ spec: - replicationState - source - volumeGroupReplicationClassName + - volumeReplicationClassName type: object status: description: VolumeGroupReplicationStatus defines the observed state of diff --git a/deploy/controller/crds.yaml b/deploy/controller/crds.yaml index 560f175f8..2f035c81c 100644 --- a/deploy/controller/crds.yaml +++ b/deploy/controller/crds.yaml @@ -1153,6 +1153,13 @@ spec: x-kubernetes-validations: - message: volumeGroupReplicationContentName is immutable rule: self == oldSelf + volumeReplicationClassName: + description: volumeReplicationClassName is the volumeReplicationClass + name for VolumeReplication object + type: string + x-kubernetes-validations: + - message: volumReplicationClassName is immutable + rule: self == oldSelf volumeReplicationName: description: Name of the VolumeReplication object created for this volumeGroupReplication @@ -1165,6 +1172,7 @@ spec: - replicationState - source - volumeGroupReplicationClassName + - volumeReplicationClassName type: object status: description: VolumeGroupReplicationStatus defines the observed state of