Commit Graph
1904 Commits
Author SHA1 Message Date
a12b373e4c Support set-based filter label selectors (#10064)
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
e2e-test-kind.yaml / extract (push) Failing after 12s
Run the E2E test on kind / get-go-version (push) Failing after 13s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Successful in 10s
Main CI / get-go-version (push) Successful in 11s
Main CI / Build (push) Failing after 25s
* 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>

---------

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
Co-authored-by: Scott Seago <sseago@redhat.com>
2026-07-24 16:03:51 -04:00
lyndon-liandGitHub 564d213e6b Merge pull request #10035 from HajimohammadiNet/fix-install-plugin-spacing
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 14s
Main CI / Build (push) Failing after 29s
Trim plugin image entries during install
2026-07-23 14:45:21 +08:00
Shubham Pampattiwar 4357ad8976 Add changelog for PR #10000
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-22 09:17:59 -07:00
Xun Jiang/Bruce JiangandGitHub 36647b0b2f Merge pull request #9974 from blackpiglet/jxun/fips-140
Disable fips140 enforcement because Kopia doesn't support it.
2026-07-22 17:28:58 +08:00
Adam ZhangandGitHub 9ed3fc855a add documentation for backup filters (#9967)
Main CI / get-go-version (push) Successful in 12s
Main CI / Build (push) Failing after 29s
Run the E2E test on kind / get-go-version (push) Failing after 20s
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
* 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>
2026-07-20 15:55:54 -04:00
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
hajimohammadi.netandGitHub 14c3c87292 Merge branch 'main' into fix-install-plugin-spacing 2026-07-19 09:59:41 +03:30
AmirHossein HajiMohammadi 10c238ab5a Add changelog for plugin install spacing
Signed-off-by: AmirHossein HajiMohammadi <a.hajimohammadi@rahkar.team>
2026-07-18 17:14:43 +03:30
Shubham Pampattiwar c24f403a2d Add changelog for PR #10009
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
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-liandGitHub dfa0a91c01 Merge pull request #9921 from shubham-pampattiwar/design/default-resource-modifier
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 11s
Main CI / Build (push) Failing after 20s
Design: Server default restore resource modifier
2026-07-16 11:11:24 +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
Xun Jiang/Bruce JiangandGitHub 05aba1e870 Merge pull request #9944 from lubronzhan/fix/flaky-wait-exec-hook-handler-test
Run the E2E test on kind / get-go-version (push) Failing after 1m13s
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 40s
fix: make TestWaitExecHandleHooks deterministic for 2-container hook ordering
2026-07-10 16:34:57 +08: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
Shubham Pampattiwar e3a3c8902c Add changelog for PR #9978
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-08 11:39:06 -07:00
Xun Jiang a9545d785f Disable fips140 enforcement because Kopia doesn't support it.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-07-08 17:40:43 +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
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-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-liandGitHub d284eeb6bb Merge branch 'main' into block-uploader-snapshot-operations 2026-06-29 15:39:45 +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
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
Chlins ZhangandGitHub 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-liandGitHub 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 ZhanandClaude Sonnet 4.6 f6243627fc fix: make TestWaitExecHandleHooks deterministic for 2-container hook ordering
Fixes a flaky test in TestWaitExecHandleHooks:
  "should return no error with 2 spec hooks in 2 different containers,
   1st container starts running after 10ms, 2nd container after 20ms,
   both succeed"

Observed failure (CI run https://github.com/velero-io/velero/actions/runs/28119573625/job/83267758421):

  mock: Unexpected Method Call
  ExecutePodCommand called with resourceVersion:"3" (both containers running),
  but mock was registered expecting resourceVersion:"2" (container1 running,
  container2 still waiting).

Root cause: the two source.Modify calls were 10ms apart. The informer's
DeltaFIFO queue can coalesce rapid updates, delivering only the latest pod
state (resourceVersion:3) to the handler before the hook for container1 fires.
The comment "each of these states will be seen by the UpdateFunc handler" was
incorrect — intermediate states can be silently skipped under load.

Fix: add waitForSignal chan struct{} to the change struct and onCalled func()
to the expectedExecution struct. The goroutine now blocks after sending the
first change until the mock signals that the hook has fired (via close), then
sends the second change. This guarantees the handler observes the intermediate
pod state (resourceVersion:2) when executing container1's hook.

Signed-off-by: Lubron Zhan <lubronzhan@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 17:37:36 -07:00
Lubron ZhanandClaude Sonnet 4.6 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 04ef90dfb7 recall the way to rebind volume with restorePV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 17:35:44 +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 d626588c10 wait PV detachment before deleting PV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-22 13:17:26 +08:00