Commit Graph

2476 Commits

Author SHA1 Message Date
Wenkai Yin(尹文开)
f64fb36508 Call WaitGroup.Done() once only when PVB changes to final status the first time to avoid panic
Call WaitGroup.Done() once only when PVB changes to final status the first time to avoid
panic

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2025-05-14 15:34:24 +08:00
Xun Jiang/Bruce Jiang
659a352ed1 Add VolumeSnapshotContent into the RIA and the mustHave resource list. (#8926)
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-05-12 17:00:33 +08:00
lyndon-li
acc8cc41c3 Merge branch 'release-1.16' into release-1.16 2025-05-09 12:07:51 +08:00
Scott Seago
ea9b4f37f3 For not found errors on managed fields, add restore warning
Signed-off-by: Scott Seago <sseago@redhat.com>
2025-05-07 11:28:16 -04:00
Lyndon-Li
7bad9df51d issue-8878: relief node os deduction error checks
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-05-07 10:57:44 +08:00
Lyndon-Li
87084ce3c7 issue 8847: inherit pod info from node-agent-windows
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-04-07 19:41:14 +08:00
Lyndon-Li
f1dcb7ba11 add third party annotation support for maintenance job
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-03-25 13:43:38 +08:00
Lyndon-Li
3c5ebbadd3 issue 8803: use deterministic name to create backupRepository
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-03-24 18:34:33 +08:00
Xun Jiang
1652e6b27f Modify how the restore workflow using the resource name.
The restore workflow used name represents the backup resource and the
restore to be restored, but the restored resource name may be different
from the backup one, e.g. PV and VSC are global resources, to avoid
conflict, need to rename them.
Reanme the name variable to backupResourceName, and use obj.GetName()
for restore operation.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-03-20 18:42:09 +08:00
Roger Zimmermann
38a52980cc Issue #8772 ensure pv removed (#8777)
Some checks failed
Run the E2E test on kind / build (push) Failing after 6m16s
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 / Build (push) Failing after 37s
Close stale issues and PRs / stale (push) Successful in 8s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m10s
Trivy Nightly Scan / Trivy nightly scan (velero-restore-helper, main) (push) Failing after 53s
* ensure pv has been deleted

Signed-off-by: Roger Zimmermann <roger.zimmermann@inventx.ch>

* ensure delete pv unit test

Signed-off-by: Roger Zimmermann <roger.zimmermann@inventx.ch>

* comment, errors

Signed-off-by: Roger Zimmermann <roger.zimmermann@inventx.ch>

* updated changelog
Signed-off-by: Roger Zimmermann <roger.zimmermann@inventx.ch>

Signed-off-by: Roger Zimmermann <roger.zimmermann@inventx.ch>

* pass value

Co-authored-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
Signed-off-by: Roger Zimmermann <roger.zimmermann@inventx.ch>

* function renamed as suggested

Signed-off-by: Roger Zimmermann <roger.zimmermann@inventx.ch>

---------

Signed-off-by: Roger Zimmermann <roger.zimmermann@inventx.ch>
Co-authored-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
2025-03-13 10:39:25 -04:00
lyndon-li
d1a244e12f Merge pull request #8774 from mpryc/upstream_8649
Some checks failed
Run the E2E test on kind / build (push) Failing after 7m29s
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 / Build (push) Failing after 39s
Close stale issues and PRs / stale (push) Successful in 9s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m19s
Trivy Nightly Scan / Trivy nightly scan (velero-restore-helper, main) (push) Failing after 1m8s
issue 8649: host_pods should not be mandatory to node-agent
2025-03-12 08:39:00 +08:00
Shubham Pampattiwar
6337c52cfb Merge pull request #8755 from sseago/csi-pvc-annotations
Some checks failed
Run the E2E test on kind / build (push) Failing after 12m44s
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 / Build (push) Failing after 42s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m11s
Trivy Nightly Scan / Trivy nightly scan (velero-restore-helper, main) (push) Failing after 57s
Move pvc annotation removal from CSI RIA to regular PVC RIA
2025-03-11 10:45:58 -07:00
Michal Pryc
b4eee87e18 issue 8649: host_pods should not be mandatory to node-agent
Enables the node-agent to start even if the
/host_pods path does not exist.

If the path is present, the existing logic
remains unchanged, ensuring it is readable.

Signed-off-by: Michal Pryc <mpryc@redhat.com>
2025-03-11 13:11:25 +01:00
Lyndon-Li
b170892e64 issue 8754: add third party annotation support
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-03-10 10:38:26 +08:00
Scott Seago
fe14a2c934 Move pvc annotation removal from CSI RIA to regular PVC RIA
Combine existing PVC non-CSI RIAs and move annotation
removal out of the CSI plugin to fix issues with
CSI volumes when using fs-backup

Signed-off-by: Scott Seago <sseago@redhat.com>
2025-03-05 15:55:55 -05:00
Matthieu MOREL
6a6a237ba7 Bump golangci-lint from v1.57.2 to v1.64.5 (#8641)
Some checks failed
Run the E2E test on kind / build (push) Failing after 5m43s
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
build-image / Build (push) Failing after 8s
Main CI / Build (push) Failing after 33s
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-03-04 13:55:29 +05:30
Wenkai Yin(尹文开)
ee43d040a6 Return directly if no pod volme backup are tracked
Return directly if no pod volme backup are tracked

Fixes #8723

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2025-02-27 16:56:03 +08:00
Shubham Pampattiwar
0eb1040a0a Add labels as a criteria for volume policy (#8713)
Some checks failed
Run the E2E test on kind / build (push) Failing after 6m23s
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 / Build (push) Failing after 38s
Close stale issues and PRs / stale (push) Successful in 9s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m5s
Trivy Nightly Scan / Trivy nightly scan (velero-restore-helper, main) (push) Failing after 55s
* Add labels as a criteria for volume policy

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

add changelog file

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

handle err

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

use labels selector.matches

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

make update

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

remove fetching pvc from volume policy filtering

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

add more ut coverage

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

* minor updates

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

use VolumeFilterData struct in GetMatchAction func

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

update parsePVC func and add more ut

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

lint fix

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

---------

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2025-02-26 10:02:45 -05:00
Wenkai Yin(尹文开)
a45c9f27e8 Merge pull request #8715 from Lyndon-Li/issue-fix-8706
Some checks failed
Run the E2E test on kind / build (push) Failing after 6m45s
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 / Build (push) Failing after 36s
Close stale issues and PRs / stale (push) Successful in 9s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 55s
Trivy Nightly Scan / Trivy nightly scan (velero-restore-helper, main) (push) Failing after 44s
Issue 8706: for immediate volumes, get node from volumeattachment
2025-02-25 14:25:45 +08:00
Xun Jiang/Bruce Jiang
f79b825cf1 Merge pull request #8684 from blackpiglet/7979_fix
7979 fix
2025-02-25 13:27:01 +08:00
Xun Jiang/Bruce Jiang
ad08c7a3ff Merge pull request #8712 from sseago/pod-initcontainer-securitycontext
Copy SecurityContext from Containers[0] if present for PVR
2025-02-25 11:02:57 +08:00
Xun Jiang
6b7dd12bf7 Modify VS and VSC restore actions.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-02-25 10:44:45 +08:00
Scott Seago
21db5f8853 Copy SecurityContext from Containers[0] if present for PVR
Signed-off-by: Scott Seago <sseago@redhat.com>
2025-02-24 15:23:29 -05:00
Tiger Kaovilai
178b6e3db5 add more maintenance interval unit tests
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2025-02-21 14:22:11 -06:00
Lyndon-Li
bf0d909524 issue 8706: for immediate volumes, get node from volumeattachment
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-02-21 13:27:44 +08:00
Tiger Kaovilai
3fb8c72b6c empty string case
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2025-02-20 16:40:49 -06:00
Tiger Kaovilai
92617d07c5 log only if not equal
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2025-02-20 16:40:49 -06:00
Tiger Kaovilai
1b7d9014a5 add to unmarshal test
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2025-02-20 16:40:49 -06:00
Tiger Kaovilai
271ff180e9 lint
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2025-02-20 16:40:48 -06:00
Tiger Kaovilai
21ae1cbe82 Address https://github.com/vmware-tanzu/velero/pull/8581#pullrequestreview-2622445640
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2025-02-20 16:40:48 -06:00
Tiger Kaovilai
3bb39d9331 Address https://github.com/vmware-tanzu/velero/pull/8581#pullrequestreview-2622443771
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2025-02-20 16:40:48 -06:00
Tiger Kaovilai
c153651044 Pass all backupRepoConfig keys to storageVariables, and thus RepoOptions.
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2025-02-20 16:40:48 -06:00
Tiger Kaovilai
5a79e70d79 Configurable Kopia Maintenance Interval
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

comment update

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

comment

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2025-02-20 16:40:48 -06:00
Lyndon-Li
e2a7986629 issue 8706: for immediate volumes, get node from volumeattachment
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-02-20 19:19:28 +08:00
Xun Jiang
eb77151f48 Delete VSC after backup completes.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-02-19 14:36:59 +08:00
Xun Jiang
620a116e7f Modify CSI related DeleteItemActions.
Remove the VS DIA.
Modify the VSC DIA: create then delete the VSC.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-02-19 14:36:59 +08:00
Xun Jiang
3843ae7030 Delete VolumeSnapshotContent from the backup sync process.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-02-19 14:36:59 +08:00
Wenkai Yin(尹文开)
80cea31a84 Merge pull request #8694 from ywk253100/250214_hook
Some checks failed
Run the E2E test on kind / build (push) Failing after 5m44s
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 / Build (push) Failing after 36s
Close stale issues and PRs / stale (push) Successful in 7s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 57s
Trivy Nightly Scan / Trivy nightly scan (velero-restore-helper, main) (push) Failing after 51s
Run backup post hooks inside ItemBlock synchronously
2025-02-18 14:37:27 +08:00
Tiger Kaovilai
a3cee616dc Upgrade go.mod k8s.io/ go.mod to v0.31.3 and set klog.SetLogger() for client-go (#8450)
Some checks failed
Run the E2E test on kind / build (push) Failing after 5m44s
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
build-image / Build (push) Failing after 10s
Main CI / Build (push) Failing after 31s
Close stale issues and PRs / stale (push) Successful in 7s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 59s
Trivy Nightly Scan / Trivy nightly scan (velero-restore-helper, main) (push) Failing after 45s
Also bumped to support upgraded k8s.io/ deps.
- controller-gen to v0.16.5
- sigs.k8s.io/controller-runtime v0.19.2

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2025-02-17 15:05:10 -05:00
Wenkai Yin(尹文开)
7aa8040c09 Run backup post hooks inside ItemBlock synchronously
Run backup post hooks inside ItemBlock synchronously as the ItemBlocks are handled asynchronously

Fixes #8516

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2025-02-17 13:27:41 +08:00
Daniel Jiang
d9721fddb5 Merge pull request #8665 from aj-2000/user/aj-2000/validate-from-schedule-flag
Some checks failed
Run the E2E test on kind / build (push) Failing after 5m7s
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 / Build (push) Failing after 32s
Validate `--from-schedule` flag in create backup command
2025-02-14 18:57:39 +08:00
Xun Jiang/Bruce Jiang
c0c4407657 Merge pull request #8681 from blackpiglet/8238_fix
Some checks failed
Run the E2E test on kind / build (push) Failing after 5m41s
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 / Build (push) Failing after 36s
Don't run maintenance on the ReadOnly BackupRepositories.
2025-02-14 11:32:49 +08:00
Wenkai Yin(尹文开)
e3a64065f1 Merge pull request #8659 from sseago/parallel-itemblocks
Implement parallel ItemBlock processing via backup_controller goroutines
2025-02-14 10:42:14 +08:00
Xun Jiang/Bruce Jiang
fa156c3961 Don't run maintenance on the ReadOnly BackupRepositories.
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
2025-02-13 13:46:53 +08:00
Wenkai Yin(尹文开)
e446d92d4c Merge pull request #8464 from shubham-pampattiwar/obj-status-restore-impl
Some checks failed
Run the E2E test on kind / build (push) Failing after 5m28s
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 / Build (push) Failing after 35s
Close stale issues and PRs / stale (push) Successful in 7s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 56s
Trivy Nightly Scan / Trivy nightly scan (velero-restore-helper, main) (push) Failing after 50s
Allowing Object-Level Resource Status Restore
2025-02-13 13:37:58 +08:00
Shubham Pampattiwar
893621c1ad Allowing Object-Level Resource Status Restore
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

add changelog

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

Update impl according to design

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

make update

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

update logging

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2025-02-12 18:59:25 -08:00
Scott Seago
fcfb2fd9ee Implement parallel ItemBlock processing via backup_controller goroutines
Signed-off-by: Scott Seago <sseago@redhat.com>
2025-02-12 12:03:37 -05:00
Wenkai Yin(尹文开)
cdcd6eb99d Fix WaitGroup panic issue
Make sure WaitGroup.Add() is called before WaitGroup.Done() to avoid WaitGroup panic issue

Fixes #8657

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2025-02-12 13:56:05 +08:00
Matthieu MOREL
9010d9b13e chore: enable unnecessary-stmt from revive
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-02-08 12:11:22 +00:00
Matthieu MOREL
ae5e94e822 chore: enable increment-decrement from revive
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-02-07 20:58:39 +01:00