diff --git a/frontend/csi/controller_helpers/kubernetes/config.go b/frontend/csi/controller_helpers/kubernetes/config.go index 0dbdc9a23..d06bc6dd2 100644 --- a/frontend/csi/controller_helpers/kubernetes/config.go +++ b/frontend/csi/controller_helpers/kubernetes/config.go @@ -54,6 +54,7 @@ const ( AnnVolumeShareFromPVC = annPrefix + "/shareFromPVC" AnnVolumeShareToNS = annPrefix + "/shareToNamespace" AnnReadOnlyClone = annPrefix + "/readOnlyClone" + AnnIsMirrorDestination = annPrefix + "/isMirrorDestination" ) var features = map[controllerhelpers.Feature]*versionutils.Version{ diff --git a/frontend/csi/controller_helpers/kubernetes/helper.go b/frontend/csi/controller_helpers/kubernetes/helper.go index 6d4806e1a..be623b4a1 100644 --- a/frontend/csi/controller_helpers/kubernetes/helper.go +++ b/frontend/csi/controller_helpers/kubernetes/helper.go @@ -587,6 +587,12 @@ func getVolumeConfig( Logc(ctx).WithError(err).Warning("Unable to parse notManaged annotation into bool.") } + isMirrorDestination, err := strconv.ParseBool(getAnnotation(annotations, AnnIsMirrorDestination)) + if err != nil { + Logc(ctx).WithError(err).Warning("Unable to parse isMirrorDestination annotation into bool.") + isMirrorDestination = false + } + return &storage.VolumeConfig{ Name: name, Size: fmt.Sprintf("%d", size.Value()), @@ -609,6 +615,7 @@ func getVolumeConfig( MountOptions: strings.Join(storageClass.MountOptions, ","), RequisiteTopologies: requisiteTopology, PreferredTopologies: preferredTopology, + IsMirrorDestination: isMirrorDestination, } }