mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-09 17:46:09 +00:00
Remove wildcard check from getNamespacesToList.
Expand wildcard in namespace filter only for backup scenario. Restore doesn't need that now, because restore has logic to rely on IncludeEverything function to check whether cluster-scoped resources should be restored. Expand wildcard will break the logic. Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
committed by
Xun Jiang/Bruce Jiang
parent
bf9e1f8fd7
commit
8ac8f49b5c
@@ -200,7 +200,7 @@ func (r *backupQueueReconciler) checkForEarlierRunnableBackups(backup *velerov1a
|
||||
func namespacesForBackup(backup *velerov1api.Backup, clusterNamespaces []string) []string {
|
||||
// Ignore error here. If a backup has invalid namespace wildcards, the backup controller
|
||||
// will validate and fail it. Consider the ns list empty for conflict detection purposes.
|
||||
nsList, err := collections.NewNamespaceIncludesExcludes().Includes(backup.Spec.IncludedNamespaces...).Excludes(backup.Spec.ExcludedNamespaces...).ActiveNamespaces(clusterNamespaces).ResolveNamespaceList()
|
||||
nsList, err := collections.NewNamespaceIncludesExcludes().Includes(backup.Spec.IncludedNamespaces...).Excludes(backup.Spec.ExcludedNamespaces...).ActiveNamespaces(clusterNamespaces).ResolveNamespaceList(true)
|
||||
if err != nil {
|
||||
return []string{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user