Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Elena Gershkovich <[email protected]>
  • Loading branch information
ELENAGER committed Jul 10, 2024
1 parent b2ab698 commit ff8fcf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions internal/controller/volumereplicationgroup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,6 @@ const (
// VolumeReplicationClass label
VolumeReplicationIDLabel = "ramendr.openshift.io/replicationid"

// Consistency group label
VolumeConsistencyGroupLabel = "ramendr.openshift.io/consistency-group"

// Maintenance mode label
MModesLabel = "ramendr.openshift.io/maintenancemodes"
)
Expand Down Expand Up @@ -865,7 +862,7 @@ func (v *VRGInstance) separatePVCsUsingStorageClassProvisioner(pvcList *corev1.P
}

func (v *VRGInstance) PVCisForCG(pvc *corev1.PersistentVolumeClaim) (string, bool) {
storageID, ok := pvc.GetLabels()[VolumeConsistencyGroupLabel]
storageID, ok := pvc.GetLabels()[StorageIDLabel]

return storageID, ok
}
Expand All @@ -880,7 +877,7 @@ func (v *VRGInstance) markPVCForCG(pvc *corev1.PersistentVolumeClaim,

// Add label for PVC, showing that this PVC is part of consistency group
return rmnutil.NewResourceUpdater(pvc).
AddLabel(VolumeConsistencyGroupLabel, storageID).
AddLabel(StorageIDLabel, storageID).
Update(v.ctx, v.reconciler.Client)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/controller/vrg_volrep.go
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ func (v *VRGInstance) createVolumeGroupReplication(storageID string, vrNamespace
}

selector := metav1.AddLabelToSelector(&v.recipeElements.PvcSelector.LabelSelector,
VolumeConsistencyGroupLabel, storageID)
StorageIDLabel, storageID)

volRep := &volrep.VolumeGroupReplication{
ObjectMeta: metav1.ObjectMeta{
Expand Down

0 comments on commit ff8fcf1

Please sign in to comment.