Commit Graph

846 Commits

Author SHA1 Message Date
lyndon-li
f947092f1a cache volume for PVR (#9397)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-11-11 13:02:56 -05:00
Xun Jiang/Bruce Jiang
82367e7ff6 Fix the Job build error when BackupReposiotry name longer than 63. (#9350)
* Fix the Job build error when BackupReposiotry name longer than 63.

Fix the Job build error.
Consider the name length limitation change in job list code.
Use hash to replace the GetValidName function.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>

* Use ref_name to replace ref.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>

---------

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-11-11 12:56:27 -05:00
Lyndon-Li
7dbe2b4358 cache volume for data download
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-11-04 16:59:52 +08:00
Scott Seago
5fc76db8c0 Add incrementalSize to DU/PVB for reporting new/changed size
Signed-off-by: Scott Seago <sseago@redhat.com>
2025-10-27 15:38:31 -04:00
Lyndon-Li
6dbe772590 snapshot size in restore CRs only
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-10-22 12:41:41 +08:00
Lyndon-Li
166f50d776 add snapshot size to data mover CRs
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-10-21 15:14:38 +08:00
Scott Seago
4ade8cf8a2 Add option for privileged fs-backup pod
Signed-off-by: Scott Seago <sseago@redhat.com>
2025-09-25 15:38:39 -04:00
lyndon-li
21691451e9 Merge branch 'main' into backup-pvc-to-different-node 2025-09-23 11:43:24 +08:00
0xLeo258
1ebe357d18 Add built-in mutex for SynchronizedVSList && Update unit tests
Signed-off-by: 0xLeo258 <noixe0312@gmail.com>
2025-09-20 09:13:07 +08:00
Shubham Pampattiwar
59289fba76 Fix Schedule Backup Queue Accumulation During Extended Blocking Scenarios
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2025-09-15 16:01:33 -07:00
lyndon-li
aad9dd9068 Merge branch 'main' into backup-pvc-to-different-node 2025-09-11 14:47:35 +08:00
Lyndon-Li
81c5b6692d backupPVC to different node
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-09-11 13:04:24 +08:00
Xun Jiang
e8208097ba Bump k8s library to v1.33.
Replace deprecated EventExpansion method with WithContext methods.
Modify UTs.
Align the E2E ginkgo CLI version with go.mod

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-09-10 17:58:38 +08:00
Xun Jiang
c62a486765 Add ConfigMap parameters validation for install CLI and server start.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-08-22 20:31:38 +08:00
Xun Jiang
ec99b50970 Remove the repository maintenance job parameters from velero server.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-08-07 23:25:22 +08:00
lyndon-li
ae29030917 Merge branch 'main' into implement8869 2025-08-06 13:45:35 +08:00
Tiger Kaovilai
35d2cc0890 Add priority class support for Velero server and node-agent
- Add --server-priority-class-name and --node-agent-priority-class-name flags to velero install command
- Configure data mover pods (PVB/PVR/DataUpload/DataDownload) to use priority class from node-agent-configmap
- Configure maintenance jobs to use priority class from repo-maintenance-job-configmap (global config only)
- Add priority class validation with ValidatePriorityClass and GetDataMoverPriorityClassName utilities
- Update e2e tests to include PriorityClass testing utilities
- Move priority class design document to Implemented folder
- Add comprehensive unit tests for all priority class implementations
- Update documentation for priority class configuration
- Add changelog entry for #8883

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

remove unused test utils

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

feat: add unit test for getting priority class name in maintenance jobs

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

doc update

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

feat: add priority class validation for repository maintenance jobs

- Add ValidatePriorityClassWithClient function to validate priority class existence
- Integrate validation in maintenance.go when creating maintenance jobs
- Update tests to cover the new validation functionality
- Return boolean from ValidatePriorityClass to allow fallback behavior

This ensures maintenance jobs don't fail due to non-existent priority classes,
following the same pattern used for data mover pods.

Addresses feedback from:
https://github.com/vmware-tanzu/velero/pull/8883#discussion_r2238681442

Refs #8869

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

refactor: clean up priority class handling for data mover pods

- Fix comment in node_agent.go to clarify PriorityClassName is only for data mover pods
- Simplify server.go to use dataPathConfigs.PriorityClassName directly
- Remove redundant priority class logging from controllers as it's already logged during server startup
- Keep logging centralized in the node-agent server initialization

This reduces code duplication and clarifies the scope of priority class configuration.

🤖 Generated with [Claude Code](https://claude.ai/code)

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

refactor: remove GetDataMoverPriorityClassName from kube utilities

Remove GetDataMoverPriorityClassName function and its tests as priority
class is now read directly from dataPathConfigs instead of parsing from
ConfigMap. This simplifies the codebase by eliminating the need for
indirect ConfigMap parsing.

Refs #8869

🤖 Generated with [Claude Code](https://claude.ai/code)

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

refactor: remove priority class validation from install command

Remove priority class validation during install as it's redundant
since validation already occurs during server startup. Users cannot
see console logs during install, making the validation warnings
ineffective at this stage.

The validation remains in place during server and node-agent startup
where it's more appropriate and visible to users.

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-06 01:36:22 -04:00
Daniel Jiang
249d8f581a Add include/exclude policy to resources policy
fixes #8610

This commit extends the resources policy, such that user can define
resource include exclude filters in the policy and reuse it in different backups.

Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2025-08-05 15:16:59 +08:00
Xun Jiang/Bruce Jiang
9cb421c26f Fix the dd and du's node affinity issue. (#9130)
Some checks failed
Run the E2E test on kind / build (push) Failing after 12m11s
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 27s
Close stale issues and PRs / stale (push) Successful in 12s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m22s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m3s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m0s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m6s
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-08-04 16:21:35 -04:00
Shubham Pampattiwar
d8f222c83f Add ConfigMap support for keepLatestMaintenanceJobs
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

add changelog file

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

lint fix

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2025-07-31 16:33:46 -07:00
Tiger Kaovilai
1daa685e7d Make ResticIdentifier optional for kopia repositories (#8987)
The ResticIdentifier field in BackupRepository is only relevant for restic
repositories. For kopia repositories, this field is unused and should be
omitted. This change:

- Adds omitempty tag to ResticIdentifier field in BackupRepository CRD
- Updates controller to only populate ResticIdentifier for restic repos
- Adds tests to verify behavior for both restic and kopia repository types

This ensures backward compatibility while properly handling kopia repositories
that don't require a restic-compatible identifier.

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2025-07-24 22:25:09 -04:00
lyndon-li
9b721a8251 Merge branch 'main' into issue-fix-9077 2025-07-23 15:05:22 +08:00
Lyndon-Li
61238ee0ae issue 9077: don't block backup deletion on list VS error
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-07-23 11:32:18 +08:00
Lyndon-Li
34f8b73507 bump up kopia to v0.21.1
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-07-22 15:56:04 +08:00
Shubham Pampattiwar
a73a150d98 Accommodate VGS workflows in PVC CSI plugin
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

Add changelog file

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

make update

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

lint fix

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

add unit tests for getVSForPVC func

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

Use v1beta1 instead of v1 v1alpha1

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

go mod tidy

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

update updateVGSCreatedVS func to use retry on conflict

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

make update minor fix

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

fix ut assert

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

Address PR feedback

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

minor updates

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

remove unsused func and add todo for dep upgrades

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2025-07-21 11:36:40 -07:00
lyndon-li
06d305ea47 Issue 8344: constrain data path expose (#9064)
Some checks failed
Run the E2E test on kind / build (push) Failing after 7m38s
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 39s
Close stale issues and PRs / stale (push) Successful in 22s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m32s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m41s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m30s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m18s
* issue 8344: constrain data path exposure.

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-07-18 13:32:45 +08:00
Lyndon-Li
2e79ec99cf Merge branch 'main' into issue-fix-8857 2025-07-08 14:24:34 +08:00
Lyndon-Li
a752b54614 issue 8857: support third party tolerations
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-07-08 14:23:00 +08:00
Lyndon-Li
88ec5fa193 issue 8813: remove restic from the valid uploader type
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-07-07 15:55:24 +08:00
Daniel Jiang
a550910f36 Add Gauge metric for BSL availability
The label of the gauge is the name of BSL

Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2025-07-03 17:36:19 +08:00
Xun Jiang
b5426516da Make the backup repository controller doesn't invalidate the BSL on restart.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-07-02 17:57:06 +08:00
Xun Jiang/Bruce Jiang
b7ffcf64cc Merge pull request #9048 from sseago/multiple-hook-tracking
Some checks failed
Run the E2E test on kind / build (push) Failing after 8m14s
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 56s
Close stale issues and PRs / stale (push) Successful in 16s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m49s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m32s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m35s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m31s
Allow for proper tracking of multiple hooks per container
2025-07-02 17:05:12 +08:00
Xun Jiang
f2133c7d22 The backup and restore data mover node selection.
Update Makefile to let the `make serve-docs` work again.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-07-01 16:26:12 +08:00
Scott Seago
ca61b65302 Allow for proper tracking of multiple hooks per container
Signed-off-by: Scott Seago <sseago@redhat.com>
2025-06-27 16:40:15 -04:00
Xun Jiang/Bruce Jiang
5ebb055c57 Add UT for maintenance's DeleteOldJobs function. (#9013)
Unify the k8s.io/api/batch/v1 import alias to bactchv1api.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2025-06-26 20:49:26 -04:00
Lyndon-Li
0450290095 resume PVB/PVR on node-agent restart
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-06-25 14:24:18 +08:00
lyndon-li
2afb55d64e Merge branch 'main' into vgdp-ms-resume-pvb-pvr 2025-06-24 11:34:53 +08:00
lyndon-li
c7e87e02ee Merge branch 'main' into vgdp-ms-resume-pvb-pvr 2025-06-24 11:09:16 +08:00
Lyndon-Li
d73cef3b94 handle velero server and node-agent restarts for vgdp ms for pvb
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-06-24 11:07:26 +08:00
lyndon-li
18f817295c Merge branch 'main' into vgdp-ms-cancel-pvb-pvr 2025-06-24 10:52:54 +08:00
Matthieu MOREL
07ea14962c fix require-error rule from testifylint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-23 15:39:54 +00:00
Lyndon-Li
cded6bd207 cancel pvb/pvr on velero server restarts
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-06-23 15:29:09 +08:00
Matthieu MOREL
3024e6223e fix equal-values rule from testifylint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-22 22:41:08 +02:00
Matthieu MOREL
59825a0506 fix len rule from testifylint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-22 22:41:08 +02:00
Lyndon-Li
12f56111c1 handle velero server and node-agent restarts for vgdp ms for pvb
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-06-18 20:04:36 +08:00
Lyndon-Li
6274593840 legacy pvr controller for restic path
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-06-16 17:22:04 +08:00
Lyndon-Li
dddf764620 pvr controller for legacy restic restore
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-06-16 15:51:35 +08:00
Lyndon-Li
33bb51b14d Merge branch 'main' into vgdp-ms-pvb-controller 2025-06-12 15:52:22 +08:00
Lyndon-Li
b8bb67a0d5 Merge branch 'main' into vgdp-ms-pvb-controller 2025-06-12 11:31:28 +08:00
Lyndon-Li
c3a8c89ae3 vgdp ms pvb controller
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2025-06-12 11:30:51 +08:00