Shubham Pampattiwar
c565da2ea6
Fix linter error: use t.Context() instead of context.Background()
...
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
2025-11-18 15:58:09 -08:00
Shubham Pampattiwar
dc3da29f3e
Apply volume policies to VolumeGroupSnapshot PVC filtering
...
VolumeGroupSnapshots were querying all PVCs with matching labels
directly from the cluster without respecting volume policies. This
caused errors when labeled PVCs included both CSI and non-CSI volumes,
or volumes from different CSI drivers that were excluded by policies.
This change filters PVCs by volume policy before VGS grouping,
ensuring only PVCs that should be snapshotted are included in the
group. A warning is logged when PVCs are excluded from VGS due to
volume policy.
Fixes #9344
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
2025-11-18 15:40:30 -08:00
Shubham Pampattiwar
fa374b6143
Merge pull request #9407 from Lyndon-Li/fix-write-repo-init-param-error
...
Run the E2E test on kind / get-go-version (push) Failing after 1m14s
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 36s
Main CI / Build (push) Failing after 18s
Close stale issues and PRs / stale (push) Successful in 11s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m36s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m0s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m11s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m2s
Issue 9400: connect repo first time after creation
2025-11-12 10:28:10 -08:00
Lyndon-Li
67cf896eaf
fix backup repo init error
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-11-12 11:02:34 +08:00
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
df07c39014
Merge pull request #9368 from shubham-pampattiwar/fix-volume-info-generatename
...
Run the E2E test on kind / get-go-version (push) Failing after 1m21s
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) Failing after 15s
Main CI / Build (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 11s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 3m52s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m6s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 57s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m4s
Track actual resource names for GenerateName in restore status
2025-11-10 14:48:15 +08:00
lyndon-li
d1e5d6b13a
Merge pull request #9367 from shubham-pampattiwar/fix-managed-fields-generatename
...
Fix managed fields patch for resources using GenerateName
2025-11-10 13:50:42 +08:00
Lyndon-Li
21b998e2c5
cache volume for data download
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-11-06 18:52:41 +08:00
Lyndon-Li
fbeab7291e
Merge branch 'main' into cache-volume-for-dd
2025-11-06 15:12:31 +08:00
lyndon-li
d4a966481b
Merge pull request #9379 from Lyndon-Li/repo-static-info-provider
...
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 2s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Failing after 10s
Main CI / Build (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 13s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 7m58s
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 1m13s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m0s
Repo provider interface refactor for repo static configuration
2025-11-06 15:11:43 +08:00
Scott Seago
bd7d28f004
don't copy securitycontext from first container if configmap found
...
Signed-off-by: Scott Seago <sseago@redhat.com >
2025-11-04 16:56:35 -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
Lyndon-Li
597cee545a
repo provider interface refactor for repo static configuration
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-11-04 16:32:55 +08:00
Lyndon-Li
9556a39a89
repo provider interface refactor for repo static configuration
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-11-03 16:16:05 +08:00
lyndon-li
c907b316a5
Merge pull request #9370 from Lyndon-Li/cache-volume-configuration
...
Run the E2E test on kind / get-go-version (push) Failing after 47s
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) Failing after 11s
Main CI / Build (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 11s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 14m2s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 5m12s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m59s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m15s
Add cache volume configuration
2025-11-01 10:38:54 +08:00
lyndon-li
75d69e1a04
Merge pull request #9362 from Lyndon-Li/cache-volume-for-exposer
...
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) Failing after 13s
Main CI / Build (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 12s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m7s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 50s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m4s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 44s
Exposer supports cache volume
2025-10-31 17:06:40 +08:00
lyndon-li
a95c90411c
Merge branch 'main' into cache-volume-configuration
2025-10-29 15:50:07 +08:00
Lyndon-Li
7178946deb
cache volume configuration
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-10-29 15:05:52 +08:00
Lyndon-Li
31a7236c7d
issue 9365: prevent multiple update of PVR
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-10-29 14:32:48 +08:00
lyndon-li
4111eb3940
Merge branch 'main' into cache-volume-for-exposer
2025-10-28 14:44:30 +08:00
Lyndon-Li
b1e5e4408f
exposer supports cache volume
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-10-28 14:43:51 +08:00
lyndon-li
0d7ef85f98
Merge pull request #9353 from Lyndon-Li/cache-dir-for-udmprepo
...
Run the E2E test on kind / get-go-version (push) Failing after 49s
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) Failing after 11s
Main CI / Build (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 1m34s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m28s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 55s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m7s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 55s
Cache dir for udmrepo
2025-10-28 13:58:47 +08:00
Shubham Pampattiwar
c2840f1c74
Fix tests: populate createdName for all created resources
...
Update test expectations to include createdName field for resources
with action 'created'. Also ensure namespaces track their created
names when created via EnsureNamespaceExistsAndIsReady.
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
2025-10-27 12:44:31 -07: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
Shubham Pampattiwar
07f30d06b9
Track actual resource names for GenerateName in restore status
...
When restoring resources with GenerateName, Kubernetes assigns the actual name
after creation, but Velero only tracked the original name from the backup in
itemKey. This caused volume information collection to fail when trying to fetch
PVCs using the original name instead of the actual created name.
Example:
- Original PVC name from backup: "test-vm-disk-1"
- Actual created PVC name: "test-vm-backup-2025-10-27-test-vm-disk-1-mdjkd"
- Volume info tried to fetch: "test-vm-disk-1" → Failed with "not found"
This affects any plugin or workflow using GenerateName during restore:
- kubevirt-velero-plugin (VMFR use case with PVC collision avoidance)
- Custom restore item actions using generateName
- Secrets/ConfigMaps restored with generateName
Changes:
1. Add createdName field to restoredItemStatus struct (pkg/restore/request.go)
2. Capture actual name from createdObj.GetName() (pkg/restore/restore.go:1520)
3. Use createdName in RestoredResourceList() when available (pkg/restore/request.go:93-95)
This fix is backwards compatible:
- createdName defaults to empty string
- When empty, falls back to itemKey.name (original behavior)
- Only populated for GenerateName resources where needed
Fixes volume information collection errors like:
"Failed to get PVC" error="persistentvolumeclaims \"<original-name>\" not found"
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
2025-10-27 12:04:46 -07:00
Shubham Pampattiwar
898fa13ed7
Fix managed fields patch for resources using GenerateName
...
When restoring resources with GenerateName (where name is empty and K8s
assigns the actual name), the managed fields patch was failing with error
"name is required" because it was using obj.GetName() which returns empty
for GenerateName resources.
The fix uses createdObj.GetName() instead, which contains the actual name
assigned by Kubernetes after resource creation.
This affects any resource using GenerateName for restore, including:
- PersistentVolumeClaims restored by kubevirt-velero-plugin
- Secrets and ConfigMaps created with generateName
- Any custom resources using generateName
Changes:
- Line 1707: Use createdObj.GetName() instead of obj.GetName() in Patch call
- Lines 1702, 1709, 1713, 1716: Use createdObj in error/info messages for accuracy
This is a backwards-compatible fix since:
- For resources WITHOUT generateName: obj.GetName() == createdObj.GetName()
- For resources WITH generateName: createdObj.GetName() has the actual name
The managed fields patch was already correctly using createdObj (lines 1698-1700),
only the Patch() call was incorrectly using obj.
Fixes restore status showing FinalizingPartiallyFailed with "name is required"
error when restoring resources with GenerateName.
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com >
2025-10-27 11:57:55 -07:00
lyndon-li
f4517f131b
Merge branch 'main' into cache-dir-for-udmprepo
2025-10-27 16:34:21 +08:00
Lyndon-Li
d4147e406b
snapshot size in restore CRs
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-10-27 04:41:04 +00:00
Lyndon-Li
8d29051bbe
expose supports cache volume
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-10-22 19:11:56 +08: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
903ee21f31
Merge branch 'main' into snapshot-size-support
2025-10-21 16:47:16 +08:00
Lyndon-Li
a4e3dccdce
Merge branch 'main' into cache-dir-for-udmprepo
2025-10-21 16:42:28 +08:00
Wenkai Yin(尹文开)
53e99556ad
Merge pull request #9291 from Lyndon-Li/dont-connect-repo-in-repo-controller
...
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 2s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Failing after 9s
Main CI / Build (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 9s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m16s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m7s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 52s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 47s
Don't connect repo in repo controller
2025-10-21 16:10:20 +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
Lyndon-Li
79b8cc40b1
Merge branch 'main' into cache-dir-for-udmprepo
2025-10-21 13:37:11 +08:00
Lyndon-Li
3e39cb4b0f
udmrepo support cache dir
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-10-21 13:36:35 +08:00
Lyndon-Li
7cec76e445
Merge branch 'main' into cache-dir-to-vgdp
2025-10-17 17:58:01 +08:00
lyndon-li
2a5804b595
Merge branch 'main' into deprecate-pvc-node-selection
2025-10-17 13:31:21 +08:00
lyndon-li
b9af3a1947
Merge branch 'main' into dont-connect-repo-in-repo-controller
2025-10-17 13:31:11 +08:00
lyndon-li
9a3fabbc55
issue 9332: make bytesDone correct for incremental backup ( #9333 )
...
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 2s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Failing after 8s
Main CI / Build (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 10s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m18s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 50s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 47s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 48s
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-10-16 12:41:21 -04:00
lyndon-li
72ddfd7d78
Merge branch 'main' into deprecate-pvc-node-selection
2025-10-14 14:40:40 +08:00
lyndon-li
18260d88ca
Merge branch 'main' into dont-connect-repo-in-repo-controller
2025-10-14 14:40:21 +08:00
lyndon-li
e6aab8ca93
add events to diagnose ( #9296 )
...
Run the E2E test on kind / get-go-version (push) Failing after 1m10s
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) Failing after 16s
Main CI / Build (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 11s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m43s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m5s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m2s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m2s
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-10-09 14:13:43 -04:00
Xun Jiang/Bruce Jiang
f8938e7fed
VerifyJSONConfigs verify every elements in Data. ( #9302 )
...
Run the E2E test on kind / get-go-version (push) Failing after 48s
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) Failing after 4s
Main CI / Build (push) Has been skipped
Close stale issues and PRs / stale (push) Failing after 6s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 7s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 3s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 3s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 4s
Add error message in the velero install CLI output if VerifyJSONConfigs fail.
Only allow one element in node-agent-configmap's Data.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com >
2025-09-29 15:08:05 -04: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
78ddeef96c
add cache dir to VGDP
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-09-25 18:19:23 +08:00
lyndon-li
c90856de65
Merge branch 'main' into dont-connect-repo-in-repo-controller
2025-09-23 16:12:09 +08:00
Lyndon-Li
a0aac09f0a
don't connect repo in repo controller
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-09-23 16:11:24 +08:00
lyndon-li
031df8d5e0
Merge branch 'main' into deprecate-pvc-node-selection
2025-09-23 11:46:00 +08:00