Description
When setting destinationNamespace to a value different from sourceNamespace, the PVC sync fails because the controller is unable to locate the PVC in the destination namespace.
Error Logs
level=error msg="[DR-SYNC-ERROR] Failed to get PVC" error="PersistentVolumeClaim \"test-vol\" not found" namespace=helloworld-dr
level=error msg="[DR-SYNC-ERROR] Failed to get PVC with direct API client too" error="persistentvolumeclaims \"test-vol\" not found" namespace=helloworld-dr
Example Configuration
apiVersion: dr-syncer.io/v1alpha1
kind: NamespaceMapping
metadata:
name: hello-world
namespace: dr-syncer
spec:
clusterMappingRef:
name: staging-shared-to-hot-dr
namespace: dr-syncer
destinationNamespace: helloworld-dr
immutableResourceConfig:
defaultHandling: Recreate
drainTimeout: 5m0s
forceDeleteTimeout: 2m0s
paused: false
pvcConfig:
dataSyncConfig:
concurrentSyncs: 1
rsyncOptions:
- "--archive"
- "--human-readable"
timeout: 5m
preserveVolumeAttributes: false
storageClassMappings:
- from: do-block-storage-xfs
to: do-block-storage-xfs
- from: do-block-storage
to: do-block-storage
syncData: true
syncPersistentVolumes: false
replicationMode: Scheduled
resourceTypes:
- PersistentVolumeClaims
- Deployments
scaleToZero: true
schedule: "* * * * *"
sourceNamespace: helloworld
syncCRDs: false
Expected Behavior
The controller should correctly locate and sync PVCs between different namespaces as specified in the NamespaceMapping configuration.
Steps to Reproduce
- Configure a
NamespaceMapping with different sourceNamespace and destinationNamespace.
- Trigger a sync operation.
- Observe the error logs indicating the PVC is not found in the destination namespace.
Possible Fix
The controller may need an update to properly reference the source PVC and map it correctly to the destination namespace.
Description
When setting
destinationNamespaceto a value different fromsourceNamespace, the PVC sync fails because the controller is unable to locate the PVC in the destination namespace.Error Logs
Example Configuration
Expected Behavior
The controller should correctly locate and sync PVCs between different namespaces as specified in the
NamespaceMappingconfiguration.Steps to Reproduce
NamespaceMappingwith differentsourceNamespaceanddestinationNamespace.Possible Fix
The controller may need an update to properly reference the source PVC and map it correctly to the destination namespace.