From 80ebc541409d35b9e9832d42add950ddcd80fe16 Mon Sep 17 00:00:00 2001 From: SkalaNetworks Date: Mon, 5 Jan 2026 23:44:41 +0100 Subject: [PATCH] chore(vrc): log why vrc is discarded when provisioner doesn't match and document behaviour Signed-off-by: SkalaNetworks --- README.md | 2 ++ internal/replicator/vrc.go | 2 ++ 2 files changed, 4 insertions(+) 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) } }