You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ the actual replication itself.
10
10
11
11
-**Automated Lifecycle**: Automatically creates `VolumeReplication` objects for PVCs with the appropriate annotation.
12
12
-**Inheritance**: Can inherit the `VolumeReplicationClass` from the PVC or from the PVC's namespace (if not specified on the PVC).
13
+
-**Exclusion by Name**: Supports excluding PVCs from replication using a global regular expression.
13
14
-**VRC Selector**: Supports selecting a `VolumeReplicationClass` using a selector, allowing for more dynamic configuration based on `StorageClass` groups.
14
15
-**Cleanup**: Automatically deletes `VolumeReplication` resources when their parent PVC is deleted or when the replication annotation is removed.
15
16
-**Leader Election**: Supports high availability with leader election to ensure only one instance is active at a time.
@@ -147,6 +148,19 @@ If the annotation is modified, the `VolumeReplication` is updated accordingly wi
147
148
148
149
If the annotation is deleted on both the PVC and the namespace, the VolumeReplication is deleted.
149
150
151
+
### Excluding PVCs from replication
152
+
153
+
It is possible to exclude some PVCs from being replicated, even if they have the correct annotations (or their namespace has them).
154
+
This is done by providing a regular expression to the controller using the `--exclusion-regex` flag or the `EXCLUSION_REGEX` environment variable.
155
+
156
+
Any PVC whose name matches the regular expression will be ignored by the controller.
157
+
For example, if you set `EXCLUSION_REGEX` to `^prime-.*`, all PVCs starting with `prime-` will be excluded from replication.
158
+
159
+
This feature is useful to avoid unnecessary replications of temporary PVCs (for example, for "prime" PVCs created by the [Container Data Importer](https://github.com/kubevirt/containerized-data-importer)).
160
+
161
+
> [!NOTE]
162
+
> If the regular expression is empty, no PVC will be excluded (unless it doesn't have the appropriate annotations).
163
+
150
164
## Configuration
151
165
152
166
The controller can be configured using command-line flags or environment variables:
@@ -155,6 +169,7 @@ The controller can be configured using command-line flags or environment variabl
0 commit comments