RamenDR / ramen

Apache License 2.0
70 stars 51 forks source link

vrg: kubeObjectProtection fix recover workflow #1467

Closed raghavendra-talur closed 1 week ago

raghavendra-talur commented 2 weeks ago

The recover workflow that was being created in the case where there was no recipe had some placeholder information.

Like

func backupSpecDummy() velero.BackupSpec {
    return velero.BackupSpec{
        IncludedNamespaces: []string{"dummy"},
        IncludedResources:  []string{"secrets"},
        LabelSelector: &metav1.LabelSelector{
            MatchLabels: map[string]string{
                "dummyKey": "dummyValue",
            },
        },
    }
}

This did not prevent the recover from working though as velero was relaxed about what was mentioned here. With Velero 1.14, the checks are stricter and if includedNamespaces have non-existent namespaces listed then the recover workflow fails.

The fix is to create a correct recover workflow for the cases where there is no recipe.

raghavendra-talur commented 2 weeks ago

I am not sure if we really need this change. Still investigating

raghavendra-talur commented 1 week ago

Tested with velero 1.14 and velero aws plugin 1.10.0 and was able to perform a failover and relocate successfully.