mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-04-19 23:30:42 +00:00
issue 7535: don't exclude resources in MustHave list during restore
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
1
changelogs/unreleased/7585-Lyndon-Li
Normal file
1
changelogs/unreleased/7585-Lyndon-Li
Normal file
@@ -0,0 +1 @@
|
||||
Fix issue #7535, add the MustHave resource check during item collection and item filter for restore
|
||||
@@ -2202,7 +2202,7 @@ func (ctx *restoreContext) getOrderedResourceCollection(
|
||||
|
||||
// Check if the resource should be restored according to the resource
|
||||
// includes/excludes.
|
||||
if !ctx.resourceIncludesExcludes.ShouldInclude(groupResource.String()) {
|
||||
if !ctx.resourceIncludesExcludes.ShouldInclude(groupResource.String()) && !ctx.resourceMustHave.Has(groupResource.String()) {
|
||||
ctx.log.WithField("resource", groupResource.String()).Infof("Skipping restore of resource because the restore spec excludes it")
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user