Commit Graph
6128 Commits
Author SHA1 Message Date
Adam Zhang 38a2ebf175 Merge pull request #9840 from adam-jian-zhang/legacy_filters_incompatibility_validation
validate incompatiblity with legacy filters

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 10:45:56 +08:00
Adam Zhang 0fd77fd04c Merge pull request #9821 from adam-jian-zhang/enhance-backup-filters-interface
extend backup resource policy

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 10:45:56 +08:00
Xun Jiang/Bruce JiangandAdam Zhang 81f7a24572 Merge pull request #9783 from adam-jian-zhang/backup-filter-design
backup filter enhancement design

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-16 10:45:56 +08:00
Daniel JiangandGitHub a5d55474cc Add maintainers as code owners (#9998) (#10002)
Run the E2E test on kind / get-go-version (push) Successful in 1m18s
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Main CI / get-go-version (push) Successful in 12s
Run the E2E test on kind / build (push) Failing after 25s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 29s
Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-07-14 21:22:41 -04:00
Shubham PampattiwarandGitHub 2fcac2285b Merge pull request #9999 from shubham-pampattiwar/cherry-pick-9995-release-1.18
[release-1.18] Fix PodVolumeBackup metadata loss on fs-backup timeout
2026-07-14 15:01:18 -07:00
Shubham Pampattiwar ef2eb6f78a Fix changelog filename for cherry-pick PR #9999
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-14 09:28:25 -07:00
Shubham Pampattiwar 89e8642d3d Fix PodVolumeBackup metadata loss on fs-backup timeout (#9995)
* 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>
(cherry picked from commit e593ba73f9)
2026-07-14 09:27:33 -07:00
Xun Jiang/Bruce JiangandGitHub 25402b6209 [1.18] Deprecate inactive maintained packages (#9912)
Run the E2E test on kind / get-go-version (push) Successful in 59s
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
Main CI / get-go-version (push) Successful in 14s
Run the E2E test on kind / build (push) Failing after 1m48s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 25s
* 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>

* Replace gopkg.in/yaml.v3 by go.yaml.in/yaml/v3

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

* Replace github.com/joho/godotenv.

Move the needed code into Velero repository.

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

* 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>

---------

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
2026-07-10 11:20:34 +08:00
Xun Jiang/Bruce JiangandGitHub c253c7fe37 Merge pull request #9940 from blackpiglet/jxun/1.18/bump_crypto_for_restic
[1.18] Bump golang.org/x/crypto to v0.52.0 for Restic.
v1.18.2 v1.18.2-rc.2
2026-06-24 14:09:49 +08:00
Xun JiangandXun Jiang/Bruce Jiang 821415cb70 Bump golang.org/x/crypto to v0.52.0 for Restic.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-06-24 13:56:47 +08:00
lyndon-liandGitHub 35afb23ba1 Merge pull request #9929 from Lyndon-Li/release-1.18
1.18.2 change-log
v1.18.2-rc.1
2026-06-18 16:01:03 +08:00
Lyndon-Li bb8160a4b1 1.18.2 change-log
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-18 15:30:17 +08:00
Xun Jiang/Bruce JiangandGitHub c8ca0670d2 Bump depedencies to fix CVEs for v1.18.2 (#9919)
* Bump depedencies to fix CVEs for v1.18.2

* Bump base image to paketobuildpacks/run-jammy-tiny:0.2.139
* Bump Golang to 1.25.11-trixie
* Bump golang.org/x/crypto to v0.53.0

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

* Fix GitHub action failures.

* Use helm/kind-action to replace engineerd/setup-kind
* Update MinIO Dockerfile URL

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

---------

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-06-15 09:23:23 -04:00
Shubham PampattiwarandGitHub d0c74b477e Add external-snapshotter version requirement to VGS docs (#9909)
Document that Velero 1.18.1+ requires external-snapshotter v8.2.0 or
later for VolumeGroupSnapshot support, since Velero upgraded from
v1beta1 to v1beta2 APIs.

Relates to #9882

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-06-11 22:14:04 -04:00
Xun Jiang/Bruce JiangandGitHub b0d1e36ac1 Merge pull request #9870 from shubham-pampattiwar/fix-wildcard-ns-perf-regression
Fix backup performance regression with includedNamespaces ["*"]
2026-06-11 11:27:30 +08:00
Shubham Pampattiwar a5e3c25fc9 Fix excluded namespace objects leaking into backup with cross-namespace listing
When getNamespacesToList returns "" (cross-namespace listing), resources
from all namespaces are listed. The nsTracker.track call for each
resource's namespace would inadvertently track excluded namespaces,
causing their namespace objects to pass through filterNamespaces.

Add a ShouldInclude check before tracking a namespace from non-namespace
resources to ensure excluded namespaces are not tracked.

Add test case for includedNamespaces ["*"] with excludedNamespaces to
verify both the namespace object exclusion and resource exclusion.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-06-10 10:04:14 -07:00
Shubham Pampattiwar ea1f23f3f6 Fix backup performance regression with includedNamespaces ["*"]
Commit 8ac8f49b5 ("Remove wildcard check from getNamespacesToList")
removed the optimization that prevented "*" from being expanded to
individual namespace names. This caused getNamespacesToList to return
all namespace names instead of "" (cross-namespace listing), resulting
in N separate API list calls per resource type instead of 1.

On clusters with many namespaces (e.g. 178 on an ACM cluster), this
means ~35,000 API calls instead of ~200, causing backups to take
18-20 minutes for just 8 items.

Restore the "*" special case in ShouldExpandWildcards so that plain
"*" is not expanded, and restore the ShouldInclude("*") check in
getNamespacesToList so that cross-namespace listing is used.

The restore fix from 8ac8f49b5 (fromBackup flag) is preserved since
restores already return false before reaching the "*" check.

Namespace exclusion continues to work correctly: the nsTracker filters
excluded namespace objects via ShouldInclude, and backupItem filters
namespace-scoped resources at line 124 of item_backupper.go.

Fixes #9869

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-06-10 10:04:14 -07:00
lyndon-liandGitHub 7ffef7609e Merge pull request #9900 from shubham-pampattiwar/cherry-pick/9896-release-1.18
[release-1.18] Skip VGS cleanup when backup did not use VolumeGroupSnapshots
2026-06-10 15:11:21 +08:00
lyndon-liandGitHub 8c7f70312e Merge branch 'release-1.18' into cherry-pick/9896-release-1.18 2026-06-10 14:05:03 +08:00
Xun Jiang/Bruce JiangandGitHub f90a37302e Merge pull request #9884 from blackpiglet/jxun/1.18/bump_dependency_packages
[1.18] Remove several deperacated or inactively maintained packages
2026-06-10 13:47:07 +08:00
Shubham Pampattiwar 8f9f9cc745 Add changelog for PR #9900
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-06-09 22:13:07 -07:00
Shubham Pampattiwar c7c749bda8 Skip VGS cleanup when backup did not use VolumeGroupSnapshots
Guard the cleanupStubVGSC() call in restore finalization with a check
for VolumeGroupSnapshotHandle in volumeInfo. This avoids a spurious
warning on clusters where the v1beta2 VolumeGroupSnapshotContent CRD
is not installed, since the List call would fail even though no stubs
exist to clean up.

Fixes #9882

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-06-09 22:11:59 -07:00
Xun Jiang/Bruce JiangandGitHub 80067a8863 Fix unknown containerd config version error in run-e2e-test action (#9883)
Run the E2E test on kind / get-go-version (push) Successful in 56s
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Main CI / get-go-version (push) Successful in 13s
Run the E2E test on kind / build (push) Failing after 5m49s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 25s
Bump kind version to v0.32.0 to support both v2, v3, and v4 version of containerd config.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-06-04 10:06:09 -04:00
lyndon-liandGitHub 81757c272b Merge pull request #9857 from blackpiglet/jxun/1.18_n-3_upgrade_test
Run the E2E test on kind / get-go-version (push) Successful in 51s
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Main CI / get-go-version (push) Successful in 13s
Run the E2E test on kind / build (push) Failing after 5m46s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 35s
Modify the e2e upgrade test to support n-1 upgrade.
2026-05-28 16:57:01 +08:00
Xun Jiang ff20d670d1 Modify the e2e upgrade test to support n-1 upgrade.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-05-28 09:29:34 +08:00
lyndon-liandGitHub a43a13b6ec Merge pull request #9842 from Lyndon-Li/release-1.18
Run the E2E test on kind / get-go-version (push) Successful in 1m5s
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Main CI / get-go-version (push) Successful in 14s
Run the E2E test on kind / build (push) Failing after 8m12s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 36s
[1.18] Fix DataUploadDeleteAction creating CMs for foreign DataUploads
2026-05-22 15:48:28 +08:00
Tiger KaovilaiandLyndon-Li 8f565d495e Add changelog for unreleased version 9791
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2026-05-22 15:25:00 +08:00
Christian SchlichtherleandLyndon-Li 2309e98e86 Also skip snapshot-info CM when DataUpload has no owner label
Per review feedback on #9791, the previous revision still let a
DataUpload with an empty velero.io/backup-name label fall through to
genConfigmap, creating a ConfigMap that deleteMovedSnapshots can never
match back to a snapshot. The CM is useless and only adds etcd churn.

Treat the missing-label case the same way as the foreign-owner case:
warn and skip the ConfigMap creation. Use a distinct warn message so
operators can tell the two misconfiguration classes apart in logs
(missing-label vs. owner mismatch from a captured velero namespace).

Test for the missing-label case is updated to assert no ConfigMap is
created and a warn is emitted. The warn assertion is generalized to
match the per-case message substring instead of a fixed string.

Signed-off-by: Christian Schlichtherle <christian@schlichtherle.de>
2026-05-22 15:22:00 +08:00
Christian SchlichtherleandLyndon-Li 14733d8892 Warn instead of silently skipping foreign DataUploads
Velero does not support self-protection: the velero namespace must
never be captured in a backup tarball. When it is, the tarball can
contain DataUpload CRs belonging to other backups, and the previous
revision of this change silently swallowed that case in the
DataUploadDeleteAction.

Per maintainer feedback, the action should make the misconfiguration
detectable rather than silent. Emit a warn-level log naming the
DataUpload, its owning backup-name label, and the executing backup,
and call out that the velero namespace should be excluded from
schedules. Continue to skip the snapshot-info ConfigMap creation so
that a mislabeled CM does not mask the real owning backup's snapshot
on deletion.

The test for the foreign-backup case now also asserts the warn is
emitted via a logrus test hook.

Signed-off-by: Christian Schlichtherle <cs@bsure-analytics.de>
2026-05-22 15:21:48 +08:00
Christian SchlichtherleandLyndon-Li 246dbc3c33 Fix DataUploadDeleteAction creating CMs for foreign DataUploads
When a backup tarball incidentally contains DataUpload CRs that belong to
a different backup (common when a schedule includes the velero namespace
where DataUploads live), DataUploadDeleteAction.Execute used to create a
"<du-name>-info" ConfigMap labeled with the *executing* backup's name
instead of the DataUpload's true owning backup. The ConfigMap is
created with Create-only semantics, so the wrong label is never
corrected.

deleteMovedSnapshots in the backup-deletion controller looks up these
ConfigMaps by velero.io/backup-name to discover which Kopia snapshots
to delete. With the wrong label, the real owning backup's expiry pass
finds no ConfigMaps for its DataUploads and silently leaves their Kopia
snapshots in object storage, leaking data over time.

Fix: in DataUploadDeleteAction.Execute, compare the DataUpload's
velero.io/backup-name label against input.Backup.Name (using
label.GetValidName to handle DNS-1035 truncation for long backup names).
If the label is present and differs, skip the DataUpload entirely; this
prevents the over-eager creation of misnamed ConfigMaps without changing
behavior for DataUploads that legitimately belong to the executing
backup, or for legacy DataUploads with no backup-name label.

Refs: #9472

Signed-off-by: Christian Schlichtherle <cs@bsure-analytics.de>
2026-05-22 15:21:18 +08:00
Xun Jiang/Bruce JiangandGitHub 26ef8fa7df Modify the E2E version comparison logic. (#9787)
Run the E2E test on kind / get-go-version (push) Successful in 57s
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Main CI / get-go-version (push) Successful in 12s
Run the E2E test on kind / build (push) Failing after 4m46s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 30s
Relax the E2E version comparison logic to allow versions doesn't suit the semver pattern.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
v1.18.1-rc.2 v1.18.1
2026-05-12 08:12:31 -07:00
lyndon-liandGitHub bf7666f142 Merge pull request #9786 from blackpiglet/jxun/1.18/bump_k8s_version_to_0.33.11
Run the E2E test on kind / get-go-version (push) Successful in 50s
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
Main CI / get-go-version (push) Successful in 12s
Run the E2E test on kind / build (push) Failing after 4m33s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 29s
Bump k8s library versions to v0.33.11
2026-05-12 14:24:03 +08:00
Xun Jiang 47b3192670 Bump k8s library versions to v0.33.11
Bump the ginkgo version in the E2E test Makefile.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-05-12 12:01:56 +08:00
Xun Jiang/Bruce JiangandGitHub 949b02030f Merge pull request #9781 from blackpiglet/jxun/1.18/bump_deps
Run the E2E test on kind / get-go-version (push) Successful in 57s
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Main CI / get-go-version (push) Successful in 14s
Run the E2E test on kind / build (push) Failing after 5m41s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 42s
[1.18] Bump Velero dependencies to latest version
2026-05-12 09:15:43 +08:00
Xun Jiang 5e3cb1eb68 Bump Velero dependencies to latest version.
* Fix UT errors: non-constant format string in call to ...
* Fix linter issues.
* Not touch the k8s client version and the controller-runtime version.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-05-11 16:15:20 +08:00
Xun Jiang ce360b4033 Use string.Builder to concatenate string in loop.
* Fix TestFindVolumeRestoresForPodLegacy error.
* Stablize the TestExecute case in pvc_action_test.go
* Use toolchain to set the specific version for go.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-05-11 15:33:34 +08:00
Xun Jiang/Bruce JiangandGitHub 5de7f612c6 Enlarge the goreleaser timeout to 60m. (#9777)
Run the E2E test on kind / get-go-version (push) Failing after 1m2s
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) Failing after 13s
Main CI / Build (push) Has been skipped
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-05-07 08:27:59 +00:00
lyndon-liandGitHub 383c796386 Merge pull request #9774 from blackpiglet/xj014661/1.18/CVE-2026-27141
Run the E2E test on kind / get-go-version (push) Failing after 54s
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
[1.18] Bump golang.net/x/net to 0.51.0 to fix CVE-2026-27141
2026-05-06 16:31:40 +08:00
Xun Jiang d245d3b0d5 Bump golang.net/x/net to 0.51.0 to fix CVE-2026-27141
Bump paketobuildpacks/run-jammy-tiny to latest tag: 0.2.129
Update the minio Dockerfile directory.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-05-06 14:58:26 +08:00
lyndon-liandGitHub bd42e3633a Merge pull request #9766 from blackpiglet/xj014661/1.18/update_windows_dockerfile
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 5s
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
[1.18] Bump Golang version for the Windows Dockerfile.
2026-04-30 18:26:58 +08:00
Xun JiangandXun Jiang/Bruce Jiang 1c121619db Bump Golang version for the Windows Dockerfile.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-04-30 18:11:22 +08:00
lyndon-liandGitHub 7590359d7b Merge pull request #9764 from Lyndon-Li/release-1.18
[1.18] Fix docker hub push error
2026-04-30 15:22:03 +08:00
lyndon-liandGitHub 7832e3a2f0 Merge branch 'release-1.18' into release-1.18 2026-04-30 15:06:24 +08:00
Lyndon-Li 614674baba fix docker hub push error
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-04-30 15:04:38 +08:00
Xun Jiang/Bruce JiangandGitHub 1005067c7b Merge pull request #9755 from reasonerjt/cp-gitaction-fix-1.18
Run the E2E test on kind / get-go-version (push) Failing after 53s
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
Cherry pick fixes to git actions to 1.18 branch
2026-04-27 23:08:00 +08:00
Daniel Jiang 552848c286 Fix error in auto-request-review action
Per action.yml of the action, the token is required.
https://github.com/necojackarc/auto-request-review/blob/e89da1a8cd7c8c16d9de9c6e763290b6b0e3d424/action.yml#L8

Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-04-27 22:35:08 +08:00
Daniel Jiang a906ab3066 Set permissions to the actions
This commit update the actions  "Auto Assign Author", "Auto Label PRs",
and  "Auto Request Review"

Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-04-27 22:35:08 +08:00
Daniel JiangandGitHub 32880613b9 Merge pull request #9758 from Lyndon-Li/release-1.18
Fix go-releaser upload error
v1.18.1-rc.1
2026-04-27 22:00:53 +08:00
Lyndon-Li ff706b0e94 fix go-releaser upload error
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-04-27 18:23:39 +08:00
lyndon-liandGitHub a43cd11060 Merge pull request #9756 from Lyndon-Li/release-1.18
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 12s
Main CI / Build (push) Has been skipped
Add concurrency limit to go-releaser
2026-04-27 17:30:46 +08:00