Commit Graph

2872 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
a34a676fa3 chore: narrow PR scope to site docs updates
Agent-Logs-Url: https://github.com/velero-io/velero/sessions/3fa04f71-b7a9-47d5-b881-fb3cd9226d98

Co-authored-by: blackpiglet <59276555+blackpiglet@users.noreply.github.com>
2026-05-25 05:35:00 +00:00
copilot-swe-agent[bot]
fb603765e2 fix: update datapath messages to new naming
Some checks failed
Run the E2E test on kind / get-go-version (push) Failing after 1m1s
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
Agent-Logs-Url: https://github.com/velero-io/velero/sessions/4e226ac0-3c47-4894-9b70-d0e0b9b7c374

Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>
2026-05-22 15:22:21 +00:00
copilot-swe-agent[bot]
c51fac63d5 Merge remote-tracking branch 'origin/main' into copilot/replace-vmware-tanzu-velero
Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>
2026-05-22 15:15:31 +00:00
copilot-swe-agent[bot]
0b7eaaf4e6 chore: replace vmware-tanzu/velero org references
Agent-Logs-Url: https://github.com/velero-io/velero/sessions/e8c22e84-a488-4645-a0e1-aea5a2926503

Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>
2026-05-22 07:38:02 +00:00
lyndon-li
3e88666872 Merge branch 'main' into data-path-naming-adjustment 2026-05-22 15:22:48 +08:00
Lyndon-Li
d08790534a Merge branch 'main' into data-path-naming-adjustment 2026-05-22 15:08:29 +08:00
Lyndon-Li
d58139536b Merge branch 'main' into kopia-repo-snapshot-operations 2026-05-22 14:57:39 +08:00
lyndon-li
40025fbbe1 Merge pull request #9817 from Lyndon-Li/metadata-operator-for-kopia-repo
Some checks failed
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 33s
Metadata operation for kopia repo
2026-05-22 14:49:12 +08:00
lyndon-li
4dc6f2cc64 Merge pull request #9791 from christian-schlichtherle/fix/dataupload-delete-foreign-backup
Fix DataUploadDeleteAction creating CMs for foreign DataUploads
2026-05-22 14:41:44 +08:00
lyndon-li
c1fc6540fb Merge pull request #9807 from Lyndon-Li/uploader-interface-fo-block-data-mover
Uploader interface for block data mover
2026-05-22 14:33:17 +08:00
Lyndon-Li
53f25cde2b data path naming adjustment for block data mover
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-05-22 14:32:37 +08:00
Lyndon-Li
205ca71588 kopia repo snapshot operations
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-05-22 06:26:40 +00:00
Lyndon-Li
9f0194d8fe Uploader interface fo block data mover
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-05-22 12:26:00 +08:00
Christian Schlichtherle
1e1eb0b4ec Merge branch 'main' into fix/dataupload-delete-foreign-backup 2026-05-21 11:53:20 +02:00
Christian Schlichtherle
2f19c3158b 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-21 11:50:21 +02:00
Adam Zhang
b0e72333a0 extend backup resource policy
- added ClusterScopedFilterPolicy/NamespacedFilterPolicy
- added run time data structure, ResolvedResourceFilter and ResolvedNamespaceFilter

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-05-21 15:36:51 +08:00
Lyndon-Li
cf5f5de911 Merge branch 'main' into data-path-naming-adjustment 2026-05-21 14:44:25 +08:00
Lyndon-Li
343ed95a5e metadata operation for Kopia repo
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-05-21 14:22:36 +08:00
Lyndon-Li
3103318c9b Merge branch 'main' into metadata-operator-for-kopia-repo 2026-05-21 13:52:41 +08:00
Lyndon-Li
32969856af Merge branch 'main' into kopia-repo-snapshot-operations 2026-05-21 13:27:40 +08:00
Lyndon-Li
d756df874f Merge branch 'main' into uploader-interface-fo-block-data-mover 2026-05-21 13:21:14 +08:00
Lyndon-Li
6bf73dc7ac Merge branch 'main' into cbt-bitmap-implementation 2026-05-21 09:22:45 +08:00
Lyndon-Li
1d03217661 add CBT bitmap implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-05-21 09:20:24 +08:00
Christian Schlichtherle
8f6c563c4d 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-15 08:10:19 +02:00
Christian Schlichtherle
fb3f94bc88 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-14 19:03:20 +02:00
Lyndon-Li
2346314729 call block uploader provider creation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-05-14 16:17:51 +08:00
Lyndon-Li
6257282117 add listsnapshot method
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-05-12 09:51:47 +08:00
Lyndon-Li
0be9fc7d09 add block uploader provider
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-05-11 17:31:40 +08:00
Lyndon-Li
22be7e3218 data path naming adjustment
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-05-11 13:53:49 +08:00
Xun Jiang
35e1e1f988 Fix unstable UT in pvc_action_test.go's TestExectue().
* Move the error assert out of goroutine.
* Create the VSC before patching VS status to ReadyToUse.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-05-11 11:33:08 +08:00
Xun Jiang
5afe5df122 Bump Velero dependencies to latest version.
* Fix UT failures caused by client-go version bump.
* Some modifications to enhance the UT stability.
* Fix UT errors: non-constant format string in call to ...
* Fix linter issues.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-05-08 17:38:42 +08:00
Lyndon-Li
6ca73a00b6 fix UT error
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-05-08 16:39:24 +08:00
Joseph Antony Vaikath
360095a2e7 Merge pull request #9558 from Joeavaikath/wildcard-ns-bugfix
Some checks failed
Run the E2E test on kind / get-go-version (push) Failing after 50s
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 41s
Wildcard namespaces: Log warning on empty resolution
2026-05-06 16:30:36 +08:00
Lyndon-Li
44ab9a6a1a add metadata operations for kopia repo
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-04-28 15:58:28 +08:00
Lyndon-Li
4befbc0afe add repo snapshot operations
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-04-28 15:47:27 +08:00
Xun Jiang/Bruce Jiang
6090392cfc Merge pull request #9732 from blackpiglet/9468_fix
Some checks failed
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 9s
Main CI / Build (push) Failing after 31s
Close stale issues and PRs / stale (push) Successful in 12s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m39s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m19s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m9s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m7s
Remove Restic code path from PodVolumeRestore
2026-04-24 15:30:58 +08:00
Xun Jiang/Bruce Jiang
f30be4b657 Merge pull request #9654 from pierluigilenoci/fix/honor-stderrthreshold
Honor stderrthreshold when logtostderr is enabled
2026-04-24 13:24:50 +08:00
peter woodman
7549408e21 update hashicorp/go-hclog and go-plugin to current version (#9613)
Some checks failed
Run the E2E test on kind / get-go-version (push) Failing after 1m1s
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 11s
Main CI / Build (push) Failing after 32s
Close stale issues and PRs / stale (push) Successful in 11s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m41s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m13s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m8s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m17s
Signed-off-by: Peter Woodman <peter@shortbus.org>
2026-04-23 00:20:05 -04:00
Joseph Antony Vaikath
3b34fb8eff Fix wildcard expansion when includes is empty and excludes has wildcards (#9684)
Some checks failed
Run the E2E test on kind / get-go-version (push) Failing after 1m5s
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) Successful in 11s
Main CI / Build (push) Failing after 33s
Close stale issues and PRs / stale (push) Successful in 12s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m53s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m8s
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 1m13s
* Fix wildcard expansion when includes is empty and excludes has wildcards

When a Backup CR is applied via kubectl with empty includedNamespaces
and a wildcard in excludedNamespaces, ShouldExpandWildcards triggers
expansion. The empty includes expands to nil, but wildcardExpanded is
set to true, causing ShouldInclude to return false for all namespaces.

Populate expanded includes with all active namespaces when the original
includes was empty (meaning "include all") so that the wildcardExpanded
check does not falsely reject everything.

Signed-off-by: Joseph <jvaikath@redhat.com>

* Changelog

Signed-off-by: Joseph <jvaikath@redhat.com>

* Normalize empty includes to * instead of active namespaces list

This ensures consistent behavior between CLI and kubectl-apply paths
for Namespace CR inclusion when excludes contain wildcards.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joseph <jvaikath@redhat.com>

* Move empty includes normalization to backup controller

Instead of normalizing empty IncludedNamespaces to ["*"] in the
collections layer's ExpandIncludesExcludes, do it earlier in
prepareBackupRequest. This ensures the spec is correct before any
downstream processing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joseph <jvaikath@redhat.com>

* Update TestProcessBackupCompletions for wildcard normalization

Add IncludedNamespaces: []string{"*"} to all expected BackupSpec
structs, reflecting the new prepareBackupRequest normalization.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joseph <jvaikath@redhat.com>

* Add checks around empty includenamespaces

Signed-off-by: Joseph <jvaikath@redhat.com>

* gofmt

Signed-off-by: Joseph <jvaikath@redhat.com>

---------

Signed-off-by: Joseph <jvaikath@redhat.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 13:24:22 -07:00
Pierluigi Lenoci
4d23571c18 fix: add changelog and nolint explanation for CI
Add missing changelog entry for PR 9654 (fixes Changelog Check).
Add explanation to //nolint:errcheck directives (fixes nolintlint).

Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
2026-04-22 16:10:46 +02:00
Pierluigi Lenoci
0fa1910afb fix: honor -stderrthreshold when -logtostderr is true (default)
klog v2 defaults -logtostderr to true, which silently ignores the
-stderrthreshold flag — all log levels are unconditionally sent to
stderr. This makes it impossible for log-aggregation systems to filter
by severity.

Bump klog to v2.140.0 and opt into the fixed behavior by setting
legacy_stderr_threshold_behavior=false and stderrthreshold=INFO (which
preserves current output while letting users override via CLI flags).

Ref: kubernetes/klog#212, kubernetes/klog#432
Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
2026-04-22 09:44:47 +02:00
Lyndon-Li
9bbadf346d modify uploader provider interface for block data mover
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-04-22 14:15:17 +08:00
Xun Jiang
da3e7cfaaf Remove Restic code path from PodVolumeRestore.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-04-22 14:07:54 +08:00
Lyndon-Li
6b7df3ef4c add CBT bitmap implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-04-21 17:52:06 +08:00
Lyndon-Li
26b125769e add CBT bitmap implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-04-21 09:50:53 +00:00
Lyndon-Li
a1fd85c791 add CBT bitmap implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-04-21 08:58:32 +00:00
lyndon-li
256e1063d7 Merge branch 'main' into cbt-interfaces 2026-04-21 14:16:23 +08:00
Lyndon-Li
2ca4e46327 add cbt interfaces
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-04-17 15:38:44 +08:00
Wenkai Yin(尹文开)
a75775ef49 Merge pull request #9724 from Lyndon-Li/unified-repo-interface-extension
Some checks failed
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 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 31s
Close stale issues and PRs / stale (push) Successful in 11s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m37s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m14s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m21s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m11s
Unified repo interface extension for block data mover
2026-04-17 14:27:52 +08:00
Lyndon-Li
455f3ba305 unified repo interface extension for block data mover
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-04-16 18:02:30 +08:00