RamenDR / ramen

Apache License 2.0
73 stars 53 forks source link

Disabling and reenabling Kube object protection causes stale resources to be restored #964

Open hatfieldbrian opened 1 year ago

hatfieldbrian commented 1 year ago

Problem

Disabling and reenabling a VRG's KubeObjectProtection does not delete its existing backups, nor the pointer to the latest backup stored in the VRG status in the S3 store(s). If the VRG were recreated, its old backups would be restored. This may be ok, but may not be. If a VRG were deleted its backups would be deleted.

Approach 1 - Define a separate CRD for KubeObjectProtection so it can have its own finalizer to handle backup deletion

VRG references it by name. If it is deleted but still referenced, then assume Kube objects need not be protected, or require reference be nil? VRG controller watches it and reconciles it.

nirs commented 1 year ago

Seems like you describe the solution in the description, but the problem is not clear. How do you reproduce it? How does it look when inspecting the clusters?

hatfieldbrian commented 1 year ago

@nirs Problem description added

hatfieldbrian commented 1 year ago

Labeled low priority since this is an uncommon use case.