Files
velero/changelogs/unreleased
a9e1f5b383 Add e2e test for namespace selection by label in resource policy (#10565)
* Add e2e test for namespace selection by label in resource policy

Covers design step 8 of #9772: a backup with no explicit
--include-namespaces (the same shape a Schedule with no
includedNamespaces produces), relying entirely on a ResourcePolicy
ConfigMap's includedNamespacesByLabel to select which namespaces to
back up.

Creates labeled and unlabeled namespaces, backs up with a
ResourcePolicy ConfigMap setting includedNamespacesByLabel, and
verifies only the labeled namespaces are restored - closing the e2e
coverage gap #10275 deferred to velero-io/velero#10564.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

* Add changelog entry for e2e test PR

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

* Fix e2e test: create Backup directly, not via CLI's implicit --include-namespaces=*

The kind e2e run showed every unlabeled namespace getting backed up
and restored anyway. velero backup create's --include-namespaces flag
defaults to ["*"] when omitted (pkg/cmd/cli/backup/create.go), so
skipping the flag still sent an *explicit* wildcard - and
mergeNamespacesByLabel deliberately leaves an explicit "*" untouched
rather than narrowing it, so includedNamespacesByLabel never got a
chance to replace anything.

Create the Backup object directly via the controller-runtime client
instead, leaving BackupSpec.IncludedNamespaces genuinely unset - the
only way to exercise the "defaulted empty" narrowing path the CLI's
own default makes unreachable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

---------

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-24 16:26:11 -04:00
..
2026-02-24 23:17:03 +08:00
2026-03-02 10:49:14 +11:00
2026-03-19 02:38:11 +05:30
2026-03-24 20:49:16 +05:30
2026-04-17 15:38:44 +08:00
2026-04-21 14:14:24 +08:00
2026-04-28 03:11:49 -04:00
2026-05-22 06:26:40 +00:00
2026-05-27 14:59:16 +08:00
2026-05-28 14:41:54 +08:00
2026-06-03 13:23:08 +08:00
2026-06-16 17:47:21 +08:00
2026-06-18 15:39:44 +08:00
2026-07-11 10:09:39 +08:00
2026-07-17 16:35:19 +08:00
2026-08-06 10:52:03 +05:30
2026-08-13 12:21:20 -04:00
2026-08-12 22:49:21 +08:00
2026-08-27 12:57:20 -04:00
2026-09-08 18:15:34 +08:00
2026-09-10 18:39:04 +05:30
2026-09-12 11:41:04 +03:00
2026-09-17 11:13:18 +08:00
2026-09-21 07:37:08 -07:00