Commit Graph
2979 Commits
Author SHA1 Message Date
Adam ZhangandGitHub d59e7d4eb8 Prioritize exact namespace match in restore (#10033)
Run the E2E test on kind / get-go-version (push) Failing after 1m12s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 12s
Main CI / Build (push) Failing after 26s
* 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-20 09:18:13 -04:00
lyndon-liandGitHub b96bb73308 Merge pull request #10007 from Lyndon-Li/cancel-pvb-on-timeout
Issue 9997: cancel ongoing PVB on timeout
2026-07-20 16:31:16 +08:00
lyndon-liandGitHub 32242d2f0a Merge pull request #10005 from Lyndon-Li/fail-earlier-when-pvr-pod-is-not-ready
Issue 9973: fail earlier when PVR pod is not ready
2026-07-20 16:30:50 +08:00
Shubham Pampattiwar 251272ae09 Address review feedback: update short names for Backup, BackupRepository, and DownloadRequest
- Backup: bkp -> bak (more common abbreviation)
- BackupRepository: br -> repo (avoids conflict with "backup & restore")
- DownloadRequest: dr -> dreq (avoids conflict with "disaster recovery")

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-17 11:44:40 -07:00
Shubham Pampattiwar deba91ab9c Add CRD short names for all Velero custom resources
Only 3 of 13 Velero CRDs had short names (bsl, vsl, ssr). This adds
short names to the remaining 10 CRDs for better kubectl usability:

  Backup=bkp, Restore=rst, Schedule=sched, BackupRepository=br,
  DeleteBackupRequest=dbr, DownloadRequest=dr, PodVolumeBackup=pvb,
  PodVolumeRestore=pvr, DataUpload=du, DataDownload=dd

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-17 11:42:09 -07:00
lyndon-liandGitHub a0749e7658 Block dev for restore (#10013)
Run the E2E test on kind / get-go-version (push) Failing after 1m3s
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) Successful in 13s
Main CI / Build (push) Failing after 22s
* add block dev operations for block uploader restore

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* add block dev operations for block uploader restore

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

---------

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-07-17 16:35:19 +08:00
Wenkai Yin(尹文开) ddac19121a Only run PVC CSI RIA for CSI snapshot
Put the checking logic at the begining to make sure only run PVC CSI RIA for CSI snapshot

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2026-07-17 13:44:41 +08:00
Chlins ZhangandGitHub 39017a205a Merge pull request #10004 from chlins/feat/data-mover-selection
Run the E2E test on kind / get-go-version (push) Failing after 55s
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) Successful in 15s
Main CI / Build (push) Failing after 23s
feat(resourcepolicies): support dataMover parameter in snapshot volume
2026-07-16 16:54:46 +08:00
lyndon-liandGitHub b0d7ada06a Block dev for block uploader backup (#9994)
* add block dev operations for block data mover backup

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* add block dev operations for block data mover backup

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* Add block device operations for block uploader backup

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* Add block device operations for block uploader backup

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

---------

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-07-16 13:44:41 +08:00
Lyndon-Li 8ade19adfc issue 9997: cancel ongoing PVB on timeout
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-07-15 17:29:20 +08:00
Xun Jiang d82c552aaa Add BackupType in backup.spec.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-07-15 08:35:06 +00:00
chlins 666d14de32 feat(resourcepolicies): support dataMover parameter in snapshot volume policy action
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-07-15 15:26:23 +08:00
Lyndon-Li a94e01760b fail earlier when PVR pod is not ready
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-07-15 15:24:17 +08:00
Shubham PampattiwarandGitHub e593ba73f9 Fix PodVolumeBackup metadata loss on fs-backup timeout (#9995)
Run the E2E test on kind / get-go-version (push) Failing after 1m6s
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) Successful in 15s
Main CI / Build (push) Failing after 24s
* 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>
2026-07-14 12:22:52 -04:00
Chlins ZhangandGitHub c825e3c136 fix(delete): surface DeleteItemAction plugin errors from InvokeDeleteActions (#9993)
Run the E2E test on kind / get-go-version (push) Failing after 56s
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) Successful in 11s
Main CI / Build (push) Failing after 21s
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-07-13 14:51:54 -07:00
Adam Zhang 8c79adde74 fix globalExcludes lookup
The kind is normalized to lower case, so should the lookup.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-11 10:09:39 +08:00
Adam ZhangandGitHub 9a690cc815 Merge pull request #9946 from adam-jian-zhang/restore_filters_via_resource_policy
Run the E2E test on kind / get-go-version (push) Failing after 1m0s
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) Successful in 12s
Main CI / Build (push) Failing after 25s
restore filters via resource policy
2026-07-11 09:03:43 +08:00
Shubham PampattiwarandGitHub ae06d40c69 Validate user-provided labels and annotations in maintenance job (#9982)
Run the E2E test on kind / get-go-version (push) Failing after 58s
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) Successful in 13s
Main CI / Build (push) Failing after 26s
* Validate user-provided labels and annotations in maintenance job

User-provided labels and annotations from maintenance JobConfigs
are now validated before being applied to the maintenance Job pod
template. Invalid label keys, label values, and annotation keys
are skipped with a warning log. This prevents the Kubernetes API
from rejecting the entire Job when a user provides labels or
annotations that violate naming rules.

Additionally, user-provided labels can no longer overwrite the
internal RepositoryNameLabel used for job tracking.

Fixes velero-io/velero#9981

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

* Add tests for label and annotation validation in maintenance job

Add test cases to TestBuildJob covering:
- Invalid label key is skipped
- Invalid label value is skipped
- Label value exceeding 63 characters is skipped
- User-provided label cannot overwrite RepositoryNameLabel
- Invalid annotation key is skipped

Also fix a latent test issue where param.BackupRepo was not reset
between test cases, and add the missing assertion for
expectedPodAnnotation which was defined but never checked.

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

* Fix gofmt formatting in maintenance test file

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

* Add changelog for PR #9982

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

---------

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-10 13:00:43 -04:00
lyndon-liandGitHub 528e9fa970 Merge pull request #9979 from Lyndon-Li/block-uploader-backup-implementation
Block uploader backup implementation
2026-07-10 13:11:13 +08:00
Adam ZhangandGitHub c1cd00ff07 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-09 22:56:56 -04:00
Wenkai Yin(尹文开)andGitHub d2342532f4 Use forward slash as the path separator to make sure it works on both Linux and Windows nodes (#9968)
Run the E2E test on kind / get-go-version (push) Failing after 1m9s
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) Successful in 14s
Main CI / Build (push) Failing after 25s
Use forward slash as the path separator to make sure it works on both Linux and Windows nodes

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2026-07-09 17:41:55 +08:00
Lyndon-Li 84bee82575 block uploader backup implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-07-09 13:15:59 +08:00
Adam Zhang f3beea83da address review comments
- normalized the input to lower case for consistency
- added validations for kind collision
- add flag for unresolved kinds, and defer skip decision base on that
- move peek-and-map test cases to restore_policies_test.go

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-09 11:50:20 +08:00
Lyndon-Li ce1c1803b2 Merge branch 'main' into block-uploader-backup-implementation 2026-07-09 11:39:30 +08:00
Adam Zhang 02b6e16088 add notes about potential data race
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-08 11:48:30 +08:00
Adam Zhang 0d6b5a4f9b add fallback for unresolved kinds via peek-and-map
When a user specifies a Custom Resource Kind in a restore filter
policy (e.g., kinds: [MyCustomKind]), the discovery helper fails
to resolve it if the CRD hasn't been restored yet.

This adds a peek-and-map fallback: if a resource type in the
backup tarball doesn't match the resolved filters, Velero peeks
at the actual Kind of the first item in the tarball and matches
it against the user's original policy strings.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-08 11:18:10 +08:00
Xun Jiang/Bruce JiangandGitHub b9a96eec7d Merge pull request #9958 from velero-io/dependabot/go_modules/pkg/apis/golang.org/x/net-0.55.0
Run the E2E test on kind / get-go-version (push) Failing after 1m9s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 2s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 10s
Main CI / Build (push) Failing after 2m5s
Bump golang.org/x/net from 0.49.0 to 0.55.0 in /pkg/apis
2026-07-06 11:54:48 +08:00
lyndon-liandGitHub cfbd1b6ae4 Merge pull request #9955 from sseago/vss-main
Early frequent polling for CSI snapshots to handle Windows VSS timeout
2026-07-06 11:11:52 +08:00
dependabot[bot]andGitHub daef5f5cf7 Bump golang.org/x/net from 0.49.0 to 0.55.0 in /pkg/apis
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.49.0 to 0.55.0.
- [Commits](https://github.com/golang/net/compare/v0.49.0...v0.55.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.55.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-03 17:50:39 +00:00
Xun Jiang/Bruce JiangandGitHub 96ae6586d0 Merge pull request #9863 from blackpiglet/jxun/change-id
Support change-id and volume-id in backup workflow.
2026-07-02 11:32:15 +08:00
Scott Seagoandaider c60a5bcc7c feat: Implement early frequent polling for CSI snapshots
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
Signed-off-by: Scott Seago <sseago@redhat.com>
2026-07-01 11:56:48 -04:00
Scott Seagoandaider fa20e46016 refactor: Optimize VSC handle readiness polling for VSS backups
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
Signed-off-by: Scott Seago <sseago@redhat.com>
2026-07-01 11:00:18 -04:00
Xun Jiang 0bc06323bf Support change-id and volume-id in backup workflow.
* Add change-id and volume-id retrieve logic for both vks and vanilla k8s environment.
* Add change-id and volume-id support code in exposer.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-07-01 15:19:52 +08:00
Lyndon-Li 8d23c7e813 block uploader backup implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 17:03:39 +08:00
Lyndon-Li 502ec5f086 remove leading and trailing separator
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 16:22:55 +08:00
Lyndon-Li 39c745ef61 set totalSize from uploader
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 16:22:21 +08:00
Lyndon-Li df21463629 block uploader backup implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 16:21:59 +08:00
Lyndon-Li 8df8709a8a block uploader snapshot implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 14:14:23 +08:00
lyndon-liandGitHub 7fc75b910c Merge branch 'main' into block-uploader-snapshot-operations 2026-06-30 14:12:31 +08:00
lyndon-liandGitHub b09a42147f Merge pull request #9943 from lubronzhan/topic/lubronzhan/make_api_own_module
Make pkg/apis its own Go module
2026-06-30 13:28:39 +08:00
Lyndon-Li 82dbef2cd9 block uploader snapshot implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 11:18:44 +08:00
lyndon-liandGitHub d284eeb6bb Merge branch 'main' into block-uploader-snapshot-operations 2026-06-29 15:39:45 +08:00
Lyndon-Li f38bc20a0a block uploader snapshot implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-29 15:02:10 +08:00
Adam Zhang b41e5df294 restore filters via resource policy
restore filters via resource policy, support ClusterScopedFilterPolicy
and NamespaceFilterPolicies.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-06-25 17:09:57 +08:00
Lyndon-Li 5bef38dc95 block uploader snapshot implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-25 08:31:32 +00:00
Lyndon-Li f4f897f669 load object from snapshot
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-25 15:36:33 +08:00
Adam Zhang ffbaceeb6d add resourcePolicy on restore CRD
Add resourcePolicy field for restore CRD which is backed by
a configmap that holds ClusterScopedFilterPolicy and
NamespacedFilterPolicies for restore side filtering.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-06-25 15:29:18 +08:00
Lyndon-Li 845bd2dc4f block uploader snapshot implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-25 15:27:18 +08:00
Chlins ZhangandGitHub f0ef255c25 Merge pull request #9928 from chlins/feat/global-policy
feat(backup): add global backup volume policies
2026-06-25 15:14:34 +08:00
lyndon-liandGitHub 518b55da25 Merge pull request #9942 from Lyndon-Li/clone-pv-after-deletion
Clone PV after deleting retained PV
2026-06-25 15:10:49 +08:00