mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-29 03:05:54 +00:00
Dedup the entries in backuprequest.spec.excludeNamespaces (#10562)
Run the E2E test on kind / setup-test-matrix (push) Failing after 4s
e2e-test-kind.yaml / extract (push) Failing after 8s
Run the E2E test on kind / get-go-version (push) Failing after 9s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 5s
Scorecard supply-chain security / Scorecard analysis (push) Skipped
Main CI / get-go-version (push) Failing after 6s
Main CI / Build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Failing after 4s
e2e-test-kind.yaml / extract (push) Failing after 8s
Run the E2E test on kind / get-go-version (push) Failing after 9s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 5s
Scorecard supply-chain security / Scorecard analysis (push) Skipped
Main CI / get-go-version (push) Failing after 6s
Main CI / Build (push) Skipped
This commit fixes the issue that when a namespace with label velero.io/exclude-from-backup: "true" is added to the exludeNamespaces of a backup CR. There will be duplicated entries of the namespace in the spec of the backup. Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
This commit is contained in:
@@ -544,6 +544,10 @@ func (b *backupReconciler) prepareBackupRequest(ctx context.Context, backup *vel
|
||||
request.Status.ValidationErrors = append(request.Status.ValidationErrors, fmt.Sprintf("error getting namespace list: %v", err))
|
||||
}
|
||||
|
||||
if len(request.Spec.ExcludedNamespaces) > 0 {
|
||||
request.Spec.ExcludedNamespaces = sets.NewString(request.Spec.ExcludedNamespaces...).List()
|
||||
}
|
||||
|
||||
// validate whether Included/Excluded resources and IncludedClusterResource are mixed with
|
||||
// Included/Excluded cluster-scoped/namespace-scoped resources.
|
||||
if oldAndNewFilterParametersUsedTogether(request.Spec) {
|
||||
|
||||
Reference in New Issue
Block a user