diff --git a/README.md b/README.md index 945d5cb..c52f8d0 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,8 @@ It is possible to link multiple `StorageClass` and `VolumeReplicationClass` obje The controller also knows that the `production-ssd-daily` `VolumeReplicationClass` can be selected using the `daily` selector. +Note that the `provisioner` of the `VolumeReplicationClass` must match the `provisioner` of the `StorageClass` it is linked to. + #### 3. Annotate your PVC or Namespace Add the `replication.superphenix.net/classSelector` annotation to your PVC or its Namespace: diff --git a/internal/replicator/vrc.go b/internal/replicator/vrc.go index b6a02bf..dc33c4e 100644 --- a/internal/replicator/vrc.go +++ b/internal/replicator/vrc.go @@ -129,6 +129,8 @@ func filterVrcFromSelector(group, selector, pvcProvisioner string) ([]string, er // Allow the pvcProvisioner to be empty, as some CSI may not place it in any annotation. if vrcProvisioner == pvcProvisioner || pvcProvisioner == "" { classes = append(classes, item.GetName()) + } else { + klog.V(2).Infof("discarded VRC %s as it doesn't have the same provisioner as the PVC, got %s, expected %s", item.GetName(), vrcProvisioner, pvcProvisioner) } }