Commit Graph
1794 Commits
Author SHA1 Message Date
Tiger KaovilaiandGitHub 982dc405a2 Add new changelog entry for 10381-kaovilai
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
e2e-test-kind.yaml / extract (push) Successful in 16s
Run the E2E test on kind / get-go-version (push) Successful in 17s
Run the E2E test on kind / build (push) Failing after 23s
Run the E2E test on kind / run-e2e-test (push) Skipped
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2026-08-24 15:32:44 -04:00
a31ffe4532 Skip DeleteSnapshot when ProviderSnapshotID is empty
When CreateSnapshot fails (e.g. quota limit), the snapshot is recorded
with an empty ProviderSnapshotID. During backup deletion, velero was
calling DeleteSnapshot("") which produces unnecessary 404 API calls.

Skip the DeleteSnapshot call when ProviderSnapshotID is empty and log
a warning instead.

Fixes #9429

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
(cherry picked from commit f84c9766ca)

Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>
2026-08-24 14:29:25 +00:00
Lyndon-Li 61a4cdd09c fix repo connection contest of the two repositories with the same storage type
- fix repo connection contest between two BSL
- add UT for repo connection contest

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-24 17:35:01 +08:00
Chlins ZhangandGitHub 25a2a449cb Only sync finished backups from object storage (#10347)
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
e2e-test-kind.yaml / extract (push) Successful in 11s
Run the E2E test on kind / get-go-version (push) Successful in 11s
push.yml / extract (push) Successful in 12s
Main CI / get-go-version (push) Successful in 12s
Run the E2E test on kind / build (push) Failing after 20s
Run the E2E test on kind / run-e2e-test (push) Skipped
Main CI / Build (push) Failing after 25s
Backup metadata with an empty or New phase was synced into the cluster as a pending backup, which the queue controller then ran as if it were newly requested. Hooks are dropped as well, since a synced backup never executes them.

Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-08-20 07:57:16 -04:00
Shubham Pampattiwar 7922bb33c2 Support copying namespace-scoped secrets/configmaps for backup and restore PVC provisioning
Backport of #9920 to release-1.18.

Enables datamover backup/restore of CSI volumes that require
namespace-scoped secrets/configmaps for provisioning (e.g., ODF/ceph-csi
encrypted volumes with Vault KMS). Adds secretNames/configMapNames to the
backupPVC/restorePVC node-agent config; the CSI snapshot and generic
restore exposers copy the named resources from the source/target
namespace to the Velero namespace before creating the intermediate PVC,
and clean them up afterward (labeled with the owner UID). Adds the
corresponding RBAC for secrets/configmaps.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-19 09:14:51 -07:00
Xun Jiang 3872b039bb Remove PVC and PV inclusion check during creating PVR.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-08-18 15:18:11 +08:00
Tiger KaovilaiandGitHub d469d81125 Add changelog for release 10263
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2026-08-13 12:31:57 -04:00
636be631a4 Backport #10250: fix pvr deadlock
Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>
2026-08-13 16:25:26 +00:00
CopilotGitHubkaovilaicopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>Tiger Kaovilai
4e19118e04 1.18: Backport #10047: Fix restore-wait init container ignoring pod-level securityContext (#10224)
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
e2e-test-kind.yaml / extract (push) Successful in 15s
Run the E2E test on kind / get-go-version (push) Successful in 17s
push.yml / extract (push) Successful in 15s
Main CI / get-go-version (push) Successful in 16s
Run the E2E test on kind / build (push) Failing after 28s
Run the E2E test on kind / run-e2e-test (push) Skipped
Main CI / Build (push) Failing after 33s
* Backport #10047: fix restore-wait init container ignoring pod-level securityContext

Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>

* Add changelog for release 10224-kaovilai

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

---------

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>
Co-authored-by: Tiger Kaovilai <tkaovila@redhat.com>
2026-08-11 16:32:14 +08:00
Adam Zhang 101496d5a3 add documentation for fine-grained restore filters
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-08-05 14:40:47 +08:00
Adam ZhangandGitHub 8b761803ff [Cherry-Pick] RIA MustInclude annotation and VSC fix for 1.18 (#10101)
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
e2e-test-kind.yaml / extract (push) Successful in 12s
Run the E2E test on kind / get-go-version (push) Successful in 13s
push.yml / extract (push) Successful in 11s
Main CI / get-go-version (push) Successful in 11s
Run the E2E test on kind / build (push) Failing after 28s
Run the E2E test on kind / run-e2e-test (push) Skipped
Main CI / Build (push) Failing after 32s
* design for RIA must-include-additional-items

Design for `restore.velero.io/must-include-additional-items` annotation
and its usage and interaction with existing filtering mechanism.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
(cherry picked from commit ac76402aa0)
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

* Add RIA must-include additional items (#10082)

Let RestoreItemActions opt in via annotation to
bypass global restore filters for AdditionalItems,
mirroring the backup-side must-include behavior.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
(cherry picked from commit a43a1bce6a)
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

* update v1.18 custom-plugins docs for RIA must-include additional items

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

* remove VolumeSnapshotContents from resourceMustHave list

Stop force-including VolumeSnapshotContents via resourceMustHave on
every restore; CSI VolumeSnapshot/PVC RestoreItemActions now set
`restore.velero.io/must-include-additional-items` so bound snapshot
dependencies are restored only when their parent is restored.

Fixes: #9957

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
(cherry picked from commit ef100da89b)
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

* add tests to cover pvc and vsc ria

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
(cherry picked from commit 63cfddd18d)
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

* fix change logs

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

---------

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-29 19:20:52 -04:00
Adam ZhangandGitHub ad0f74ee9d [Cherry-pick]Set based label selectors for 1.18 (#10072)
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
e2e-test-kind.yaml / extract (push) Successful in 12s
Run the E2E test on kind / get-go-version (push) Successful in 14s
push.yml / extract (push) Successful in 13s
Main CI / get-go-version (push) Successful in 14s
Run the E2E test on kind / build (push) Failing after 28s
Run the E2E test on kind / run-e2e-test (push) Skipped
Main CI / Build (push) Failing after 30s
* add documentation for backup filters (#9967)

* add documentation for backup filters

Add user guide for fine grained backup filters with examples
from easy to advanced.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

* address review comments

- enhanced example 3, explain how each item got excluded
- enhanced example 8, explain the exact match rule, and how the
  ordering affecting namespace that has  multiple match patterns
- cross link to restore side design
- fix the error msg to be consistent with implemenation

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

---------

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

* update backup filters example 14

update the excludeNames to match example 3 for better consistency.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

* Support set-based filter label selectors (#10064)

* Support set-based filter label selectors

Use matchLabels/matchExpressions in fine-grained filters.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

* omit the details of resource policy for cli

The reason to not resolve and display CLI is because it may go
out of sync, we want to avoid display it to mislead users.

We may consider to cpature those information and display it
in later release.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

* update change log

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

---------

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-27 15:13:40 +08:00
Adam Zhang 893000a369 update changelog id to match PR
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-21 10:37:32 +08:00
Adam Zhang 202778a386 Prioritize exact namespace match in restore (#10033)
* Prioritize exact namespace match in restore

Align restore pipeline with backup pipeline by
evaluating exact namespace matches before glob
patterns in namespacedFilterPolicies. This ensures
specific overrides always win regardless of list
order.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

* improve test cases

add test cases for exact listed first, and excat listed last to
ensure the behavior that the order does not matter for exact
listed namespace, the rule will be always honored.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>

---------

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-21 10:33:16 +08:00
lyndon-liandGitHub 16f0df492a issue 9997: cancel ongoing PVB on timeout (#10039)
Run the E2E test on kind / get-go-version (push) Successful in 1m1s
Run the E2E test on kind / setup-test-matrix (push) Successful in 2s
Main CI / get-go-version (push) Successful in 11s
Run the E2E test on kind / build (push) Failing after 23s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 21s
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-07-20 17:35:55 +08:00
Adam Zhang 042f49005d consolidated change logs
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 15:09:26 +08:00
Xun Jiang/Bruce JiangandAdam Zhang fdc22a9217 Merge pull request #9989 from adam-jian-zhang/fix-globalExcludes-lookup
fix globalExcludes lookup

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 15:01:07 +08:00
Adam Zhang e3bfce3697 add cli for create/view restore resource policies (#9966)
Added CLI for creating restore resource policies, and view
the resource policies associated with resource if present.
Only list the name of the configmap for now.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 15:01:06 +08:00
Adam Zhang 6b34d9bf95 Merge pull request #9946 from adam-jian-zhang/restore_filters_via_resource_policy
restore filters via resource policy

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 15:01:06 +08:00
Adam Zhang 6e3f613904 Merge pull request #9939 from adam-jian-zhang/resource_policy_for_restore
add resourcePolicy on restore CRD

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 15:01:06 +08:00
chlins f28850e117 feat(backup): add global backup volume policies
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-07-16 13:31:22 +08:00
chlins 97a0375a8d feat(resourcepolicies): support PVC volume mode and access mode matching
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-07-16 11:26:41 +08:00
Adam Zhang 72b2fb2dc0 add change logs
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 10:49:17 +08:00
Adam Zhang 0af087c19a Merge pull request #9908 from adam-jian-zhang/cache-ns-filter-lookup
caching the call for GetNamespaceFilter

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 10:45:56 +08:00
Adam Zhang 78647768c4 Merge pull request #9881 from adam-jian-zhang/backup-filters-cli
cli support for fine-grained filter policies

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 10:45:56 +08:00
Adam Zhang 837c085ea4 Merge pull request #9880 from adam-jian-zhang/backup-filters-core
implemented fine-grained backup filter policies

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 10:45:56 +08:00
Adam Zhang 385ac961e5 Merge pull request #9848 from adam-jian-zhang/namespaced-filter-policies-validation
Add validations for NamespacedFilterPolicies

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 10:45:56 +08:00
Adam Zhang fe7a7456f6 Merge pull request #9847 from adam-jian-zhang/cluster-scoped-filter-policy-validation
Add validations for ClusterScopedFilterPolicy

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 10:45:56 +08:00
Adam Zhang 38a2ebf175 Merge pull request #9840 from adam-jian-zhang/legacy_filters_incompatibility_validation
validate incompatiblity with legacy filters

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 10:45:56 +08:00
Adam Zhang 0fd77fd04c Merge pull request #9821 from adam-jian-zhang/enhance-backup-filters-interface
extend backup resource policy

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 10:45:56 +08:00
Shubham Pampattiwar ef2eb6f78a Fix changelog filename for cherry-pick PR #9999
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-14 09:28:25 -07:00
Shubham Pampattiwar 89e8642d3d Fix PodVolumeBackup metadata loss on fs-backup timeout (#9995)
* Fix PodVolumeBackup metadata loss on fs-backup timeout

When a backup hits the fs-backup timeout, WaitAllPodVolumesProcessed
returned nil because PVBs were only collected from the indexer in the
done branch of the select. This discarded all PVB metadata including
already-completed PVBs, making their data unrestorable.

Move the PVB collection loop to run after the select so tracked PVBs
are always persisted regardless of timeout.

Fixes #9986

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Add changelog for PR #9995

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Filter non-completed PVBs in hasPodVolumeBackup

After preserving tracked PVBs on timeout, non-completed PVBs (in-progress
or with no snapshot ID) would cause hasPodVolumeBackup to return true,
leading the restore to skip the original PV and dynamically re-provision
it without any data to restore from.

Only match PVBs that are Completed with a valid SnapshotID.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Add unit tests for hasPodVolumeBackup phase filtering

Verify that hasPodVolumeBackup only matches PVBs that are Completed
with a valid SnapshotID, and rejects in-progress, failed, or
empty-snapshot PVBs.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

---------

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
(cherry picked from commit e593ba73f9)
2026-07-14 09:27:33 -07:00
Lyndon-Li bb8160a4b1 1.18.2 change-log
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-18 15:30:17 +08:00
Shubham Pampattiwar ea1f23f3f6 Fix backup performance regression with includedNamespaces ["*"]
Commit 8ac8f49b5 ("Remove wildcard check from getNamespacesToList")
removed the optimization that prevented "*" from being expanded to
individual namespace names. This caused getNamespacesToList to return
all namespace names instead of "" (cross-namespace listing), resulting
in N separate API list calls per resource type instead of 1.

On clusters with many namespaces (e.g. 178 on an ACM cluster), this
means ~35,000 API calls instead of ~200, causing backups to take
18-20 minutes for just 8 items.

Restore the "*" special case in ShouldExpandWildcards so that plain
"*" is not expanded, and restore the ShouldInclude("*") check in
getNamespacesToList so that cross-namespace listing is used.

The restore fix from 8ac8f49b5 (fromBackup flag) is preserved since
restores already return false before reaching the "*" check.

Namespace exclusion continues to work correctly: the nsTracker filters
excluded namespace objects via ShouldInclude, and backupItem filters
namespace-scoped resources at line 124 of item_backupper.go.

Fixes #9869

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-06-10 10:04:14 -07:00
Shubham Pampattiwar 8f9f9cc745 Add changelog for PR #9900
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-06-09 22:13:07 -07:00
Tiger KaovilaiandLyndon-Li 8f565d495e Add changelog for unreleased version 9791
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2026-05-22 15:25:00 +08:00
Christian SchlichtherleandLyndon-Li 246dbc3c33 Fix DataUploadDeleteAction creating CMs for foreign DataUploads
When a backup tarball incidentally contains DataUpload CRs that belong to
a different backup (common when a schedule includes the velero namespace
where DataUploads live), DataUploadDeleteAction.Execute used to create a
"<du-name>-info" ConfigMap labeled with the *executing* backup's name
instead of the DataUpload's true owning backup. The ConfigMap is
created with Create-only semantics, so the wrong label is never
corrected.

deleteMovedSnapshots in the backup-deletion controller looks up these
ConfigMaps by velero.io/backup-name to discover which Kopia snapshots
to delete. With the wrong label, the real owning backup's expiry pass
finds no ConfigMaps for its DataUploads and silently leaves their Kopia
snapshots in object storage, leaking data over time.

Fix: in DataUploadDeleteAction.Execute, compare the DataUpload's
velero.io/backup-name label against input.Backup.Name (using
label.GetValidName to handle DNS-1035 truncation for long backup names).
If the label is present and differs, skip the DataUpload entirely; this
prevents the over-eager creation of misnamed ConfigMaps without changing
behavior for DataUploads that legitimately belong to the executing
backup, or for legacy DataUploads with no backup-name label.

Refs: #9472

Signed-off-by: Christian Schlichtherle <cs@bsure-analytics.de>
2026-05-22 15:21:18 +08:00
Lyndon-Li 80cd737447 changelog for 1.18.1
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-04-27 12:05:17 +08:00
8f81ac101c Fix wildcard expansion when includes is empty and excludes has wildcards (#9684)
* Fix wildcard expansion when includes is empty and excludes has wildcards

When a Backup CR is applied via kubectl with empty includedNamespaces
and a wildcard in excludedNamespaces, ShouldExpandWildcards triggers
expansion. The empty includes expands to nil, but wildcardExpanded is
set to true, causing ShouldInclude to return false for all namespaces.

Populate expanded includes with all active namespaces when the original
includes was empty (meaning "include all") so that the wildcardExpanded
check does not falsely reject everything.

Signed-off-by: Joseph <jvaikath@redhat.com>

* Changelog

Signed-off-by: Joseph <jvaikath@redhat.com>

* Normalize empty includes to * instead of active namespaces list

This ensures consistent behavior between CLI and kubectl-apply paths
for Namespace CR inclusion when excludes contain wildcards.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joseph <jvaikath@redhat.com>

* Move empty includes normalization to backup controller

Instead of normalizing empty IncludedNamespaces to ["*"] in the
collections layer's ExpandIncludesExcludes, do it earlier in
prepareBackupRequest. This ensures the spec is correct before any
downstream processing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joseph <jvaikath@redhat.com>

* Update TestProcessBackupCompletions for wildcard normalization

Add IncludedNamespaces: []string{"*"} to all expected BackupSpec
structs, reflecting the new prepareBackupRequest normalization.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joseph <jvaikath@redhat.com>

* Add checks around empty includenamespaces

Signed-off-by: Joseph <jvaikath@redhat.com>

* gofmt

Signed-off-by: Joseph <jvaikath@redhat.com>

---------

Signed-off-by: Joseph <jvaikath@redhat.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-04-24 13:34:26 +08:00
Priyansh ChoudharyandGitHub 4c91959f23 Backport PR #9693 and #9700 to Release-1.18 (#9731)
Run the E2E test on kind / get-go-version (push) Failing after 1m28s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Failing after 2m4s
Main CI / Build (push) Has been skipped
* fix: backup deletion silently succeeds when tarball download fails (#9693)

* Enhance backup deletion logic to handle tarball download failures and clean up associated CSI VolumeSnapshotContents
Signed-off-by: Priyansh Choudhary <im1706@gmail.com>

* added changelog
Signed-off-by: Priyansh Choudhary <im1706@gmail.com>

* Refactor error handling in backup deletion
Signed-off-by: Priyansh Choudhary <im1706@gmail.com>

* Refactor backup deletion logic to skip CSI snapshot cleanup on tarball download failure
Signed-off-by: Priyansh Choudhary <im1706@gmail.com>

* prevent backup deletion when errors occur
Signed-off-by: Priyansh Choudhary <im1706@gmail.com>

* added logger
Signed-off-by: Priyansh Choudhary <im1706@gmail.com>

* Add delay to avoid race conditions during VolumeSnapshotContent deletion (#9700)

* Add delay to avoid race conditions during VolumeSnapshotContent deletion
Signed-off-by: Priyansh Choudhary <im1706@gmail.com>

* updated changelog
Signed-off-by: Priyansh Choudhary <im1706@gmail.com>

* Updated Changelog
Signed-off-by: Priyansh Choudhary <im1706@gmail.com>

* Updated changelog
Signed-off-by: Priyansh Choudhary <im1706@gmail.com>

---------

Signed-off-by: Priyansh Choudhary <im1706@gmail.com>
2026-04-16 13:35:12 -04:00
77945d9176 [release-1.18] Add CI check for invalid characters in file paths (#9691)
Run the E2E test on kind / get-go-version (push) Failing after 1m4s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Failing after 12s
Main CI / Build (push) Has been skipped
* Add CI check for invalid characters in file paths

Go's module zip rejects filenames containing certain characters (shell
special chars like " ' * < > ? ` |, path separators : \, and non-letter
Unicode such as control/format characters). This caused a build failure
when a changelog file contained an invisible U+200E LEFT-TO-RIGHT MARK
(see PR #9552).

Add a GitHub Actions workflow that validates all tracked file paths on
every PR to catch these issues before they reach downstream consumers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
(cherry picked from commit 6d18d9b303)

* Fix changelog filenames containing invisible U+200E characters

Remove LEFT-TO-RIGHT MARK unicode characters from changelog filenames
that would cause Go module zip failures.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

---------

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
Co-authored-by: Scott Seago <sseago@redhat.com>
2026-04-13 15:33:08 -04:00
Adam ZhangandXun Jiang/Bruce Jiang c17d6a0a04 Fix DataUpload list scope in CSI PVC backup plugin
The `getDataUpload` function in the CSI PVC backup plugin was
previously making a cluster-scoped list query to retrieve DataUpload
CRs. In environments with strict minimum-privilege RBAC, this would
fail with forbidden errors.
This explicitly passes the backup namespace into the `ListOptions`
when calling `crClient.List`, correctly scoping the queries to the
backup's namespace. Unit tests have also been updated to ensure
cross-namespace queries are rejected appropriately.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-04-13 14:52:33 +08:00
Shubham Pampattiwar 3336861cd6 Update changelog filename for cherry-pick PR #9706
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-04-10 17:19:20 -07:00
Shubham Pampattiwar af22d4419c Add changelog for PR #9695
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-04-10 17:17:05 -07:00
Adam Zhang 0291c53e9d Fix PodVolumeBackup list scope during restore
Restrict the listing of PodVolumeBackup resources to the specific
restore namespace in both the core restore controller and the pod
volume restore action plugin. This prevents "Forbidden" errors when
Velero is configured with namespace-scoped minimum privileges,
avoiding the need for cluster-scoped list permissions for
PodVolumeBackups.

Fixes: #9681

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-04-09 09:57:04 +08:00
Shubham PampattiwarandGitHub 5ad4e604b8 [release-1.18] Fix VolumeGroupSnapshot restore failure with Ceph RBD CSI driver (#9687)
Run the E2E test on kind / get-go-version (push) Failing after 1m4s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Failing after 12s
Main CI / Build (push) Has been skipped
* Fix VolumeGroupSnapshot restore failure with Ceph RBD CSI driver (#9516)

* Fix VolumeGroupSnapshot restore on Ceph RBD

This PR fixes two related issues affecting CSI snapshot restore on Ceph RBD:

1. VolumeGroupSnapshot restore fails because Ceph RBD populates
   volumeGroupSnapshotHandle on pre-provisioned VSCs, but Velero doesn't
   create the required VGSC during restore.

2. CSI snapshot restore fails because VolumeSnapshotClassName is removed
   from restored VSCs, preventing the CSI controller from getting
   credentials for snapshot verification.

Changes:
- Capture volumeGroupSnapshotHandle during backup as VS annotation
- Create stub VGSC during restore with matching handle in status
- Look up VolumeSnapshotClass by driver and set on restored VSC

Fixes #9512
Fixes #9515

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Add changelog for VGS restore fix

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Fix gofmt import order

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Add changelog for VGS restore fix

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Fix import alias corev1 to corev1api per lint config

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Fix: Add snapshot handles to existing stub VGSC and add unit tests

When multiple VolumeSnapshots from the same VolumeGroupSnapshot are
restored, they share the same VolumeGroupSnapshotHandle but have
different individual snapshot handles. This commit:

1. Fixes incomplete logic where existing VGSC wasn't updated with
   new snapshot handles (addresses review feedback)

2. Fixes race condition where Create returning AlreadyExists would
   skip adding the snapshot handle

3. Adds comprehensive unit tests for ensureStubVGSCExists (5 cases)
   and addSnapshotHandleToVGSC (4 cases) functions

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Clean up stub VolumeGroupSnapshotContents during restore finalization

Add cleanup logic for stub VGSCs created during VolumeGroupSnapshot restore.
The stub VGSCs are temporary objects needed to satisfy CSI controller
validation during VSC reconciliation. Once all related VSCs become
ReadyToUse, the stub VGSCs are no longer needed and should be removed.

The cleanup runs in the restore finalizer controller's execute() phase.
Before deleting each VGSC, it polls until all related VolumeSnapshotContents
(correlated by snapshot handle) are ReadyToUse, with a timeout fallback.
Deletion failures and CRD-not-installed scenarios are treated as warnings
rather than errors to avoid failing the restore.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Fix lint: remove unused nolint directive and simplify cleanupStubVGSC return

The cleanupStubVGSC function only produces warnings (not errors), so
simplify its return signature. Also remove the now-unused nolint:unparam
directive on execute() since warnings are no longer always nil.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

---------

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Rename changelog file to match cherry-pick PR number

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

---------

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-04-08 12:45:02 -07:00
lyndon-liandGitHub cce0f20168 Merge branch 'release-1.18' into custom-volume-policy-1.18 2026-04-08 11:08:42 +08:00
Xun JiangandXun Jiang/Bruce Jiang 8ac8f49b5c 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>
2026-04-08 08:12:21 +08:00
Scott SeagoandTiger Kaovilai 5dd9d5242b Add custom action type to volume policies (#9540)
* Add custom action type to volume policies

Signed-off-by: Scott Seago <sseago@redhat.com>

* Update internal/resourcepolicies/resource_policies.go

Co-authored-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
Signed-off-by: Scott Seago <sseago@redhat.com>

* added "custom" to validation list

Signed-off-by: Scott Seago <sseago@redhat.com>

* responding to review comments

Signed-off-by: Scott Seago <sseago@redhat.com>

---------

Signed-off-by: Scott Seago <sseago@redhat.com>
Co-authored-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
Signed-off-by: Scott Seago <sseago@redhat.com>
2026-04-07 14:57:15 -04:00
lyndon-liandGitHub c9b5429a7a Merge branch 'release-1.18' into fix-node-agent-detection-1.18 2026-04-03 15:34:39 +08:00