Commit Graph

2950 Commits

Author SHA1 Message Date
Adam Zhang 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(尹文开) 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
Xun Jiang/Bruce Jiang 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-li 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] 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 Jiang 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 Seago 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 Seago 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 8df8709a8a block uploader snapshot implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 14:14:23 +08:00
lyndon-li 7fc75b910c Merge branch 'main' into block-uploader-snapshot-operations 2026-06-30 14:12:31 +08:00
lyndon-li 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-li 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
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 Zhang 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-li 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
Chlins Zhang bf08827426 Merge branch 'main' into feat/global-policy 2026-06-25 15:04:28 +08:00
chlins 21d67a8622 feat(backup): add global backup volume policies
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-06-25 11:31:08 +08:00
lyndon-li cfd4914123 decide restorePVC volumeMode by data mover type (#9941)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-25 11:06:53 +08:00
Lubron Zhan eda35227bb Make pkg/apis its own Go module
Extract pkg/apis into a standalone Go module with its own go.mod/go.sum,
and wire it back into the main module via a local replace directive.

Signed-off-by: Lubron Zhan <lubronzhan@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 11:09:23 -07:00
Lyndon-Li 2c5dcb8474 clone PV after deleting retained PV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-24 18:27:57 +08:00
Lyndon-Li eb0aa625ce use restorePV to cover retained and non-retained case
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 17:33:17 +08:00
Lyndon-Li 20a0def15d add wait restorePV detach to same mode route
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 17:23:24 +08:00
Lyndon-Li 77520d0522 recall the way to rebind volume with restorePV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 17:21:36 +08:00
Lyndon-Li a8cf6646e1 wait PV detachment before deleting PV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 16:22:33 +08:00
Lyndon-Li b68aa15344 wait PV detachment before deleting PV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 16:21:51 +08:00
lyndon-li 3b66458edd Merge branch 'main' into pv-rebind-test-2 2026-06-22 13:17:51 +08:00
Lyndon-Li d626588c10 wait PV detachment before deleting PV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 13:17:26 +08:00
Xun Jiang/Bruce Jiang 6e6bf8119b Merge pull request #9911 from blackpiglet/jxun/add_log_for_filtered_resources
Add log when resources are filtered out due to verbs or sub-resources.
2026-06-22 11:36:03 +08:00
Lyndon-Li 00b25fe31a Merge branch 'main' into pv-rebind-test-2 2026-06-22 11:23:12 +08:00
Lyndon-Li 22d8b4acbb wait PV detachment before deleting PV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 11:21:20 +08:00
lyndon-li 6b9fd2f51f Merge branch 'main' into data-mover-support-fs-type 2026-06-18 15:36:51 +08:00
Joseph Antony Vaikath 2826b98190 Fix restore finalization overwriting dynamically provisioned PV labels (#9903)
* Merge backup PV labels instead of wholesale replacement during restore finalization

Change patchDynamicPVWithVolumeInfo to merge backup labels into the
dynamically provisioned PV rather than overwriting its entire label map.
Labels already present on the new PV (e.g. topology labels set by the
provisioner) are preserved, and only missing labels from the backup are
added. This prevents stale topology labels from the source cluster from
overwriting correct values set by the target cluster's provisioner.

Update needPatch to only trigger when backup labels are absent from the
new PV, not when values differ — since differing values now intentionally
favour the dynamically provisioned PV.

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

* Add changelog

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

* Update changelog to reflect new approach

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

* Trigger CI rebuild

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

---------

Signed-off-by: Joseph <joseph@amazee.io>
Signed-off-by: Joseph <jvaikath@redhat.com>
2026-06-17 08:30:33 -04:00
Lyndon-Li 6a8ba4af5c support fsType for data mover
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-16 17:59:51 +08:00
lyndon-li 55eb5f2820 Clone pv on rebind (#9913)
* clone pv on rebind

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

* update fsType to cloned PV

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

* clone pv on rebind

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

* clone pv on rebind

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

---------

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-16 17:47:21 +08:00
Lyndon-Li 180bf4836e support fsType for data mover
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-15 18:13:30 +08:00
Adam Zhang 13f06026c0 caching the call for GetNamespaceFilter
Introduces a concurrent-safe sync.Map cache to the backup Request struct
to memoize GetNamespaceFilter results. This avoids re-evaluating glob
patterns for every item, significantly improving backup performance while
preserving the original exact-match precedence logic.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-06-15 16:18:54 +08:00
Xun Jiang 4cf33421da Add log when resources are filtered out due to verbs or sub-resources.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-06-12 14:57:26 +08:00
Xun Jiang/Bruce Jiang 02cb85ce90 Merge pull request #9890 from blackpiglet/jxun/main/bump_deps
[main] Bump some dependancies to fix CVEs and replace some inactive maintained packages.
2026-06-11 10:08:22 +08:00
lyndon-li 4c1950980a Merge pull request #9887 from Lyndon-Li/incremental-object-aware-write-at
Incremental aware object writer - writeat
2026-06-10 18:01:42 +08:00
Xun Jiang 49b670a791 Replace github.com/pkg/errors by github.com/cockroachdb/errors
Change errors.Cause to errors.Is, because github.com/cockroachdb/errors
New() function create a error with error stack with depth 1, but
github.com/pkg/errors's New() function create error with no depth.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-06-10 15:55:57 +08:00
Xun Jiang 981988d31b Replace github.com/joho/godotenv.
Move the needed code into Velero repository.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-06-10 15:54:17 +08:00
Xun Jiang e395b6ea6b Replace github.com/robfig/cron/v3 by github.com/netresearch/go-cron
Replace k8s.io/utils/pointer with k8s.io/utils/ptr

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-06-10 15:54:17 +08:00
lyndon-li 901b1a0ed1 Merge pull request #9892 from Lyndon-Li/refactor-generic-exposer-interface
Enhance RebindVolume method for generic restore exposer
2026-06-10 15:54:16 +08:00
lyndon-li dac51be057 Merge pull request #9899 from Lyndon-Li/refactor-repo-interface
Refactor object writer interface
2026-06-10 15:35:49 +08:00