Commit Graph
6724 Commits
Author SHA1 Message Date
b7d83a6f2b Cherry pick the in-place restore implementation PRs from feature branch to main (#10415)
* Update CRDs and CLI to support in-place restore (#10038)

Update CRDs(Restore, DataDownload, PodVolumeRestore) and restore create CLI to support in-place restore

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>

* Update Kopia(filesystem) uploader to support incremental and deleteExtraFile during restore (#10066)

Update Kopia(filesystem) uploader to support incremental and deleteExtraFile during restore

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>

* Update Restore Exposer and PVC CSI to support in-place restore (#10104)

1. Update Restore Exposer to support exposing with existing PV for in-place restore
2. Update PVC CSI RIA to continue the restore process for in-place restore

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>

* Update Block uploader to support increase restore (#10244)

Update Block uploader to support increase restore

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>

* Update Exposer to recreate the target PV if the volume mode is different with the restore PVC (#10257)

Update Exposer to recreate the target PV if the volume mode is different with t
he restore PVC

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>

* Preserve PVC selected-node annotation via carrier annotation for in-place restore

For in-place volume data restore, the existing PVC is deleted and
recreated. For StorageClasses with the WaitForFirstConsumer volume
binding mode, losing the volume.kubernetes.io/selected-node annotation
could let the scheduler place the recreated workload Pod in a different
zone than the original PV, leaving it stuck in ContainerCreating.

Instead of relying on RestoreItemAction execution order (the generic
PVC RIA unconditionally strips the selected-node annotation), the PVC
CSI RIA now captures the annotation from the existing PVC right before
deleting it and carries it on the target PVC via the Velero-internal
restore.velero.io/inplace-restore-selected-node annotation. The restore
engine translates the carrier back to the Kubernetes annotation after
all RestoreItemActions have run and always strips the carrier so it
never lands on the cluster.

This makes the behavior independent of RIA ordering: the Kubernetes
annotation is stripped by default on every path (including when the
target PVC does not exist and Velero falls back to provisioning a new
PVC), and preservation only happens when the CSI RIA explicitly
captured a value from the existing PVC.

Signed-off-by: chlins <chlins.zhang@gmail.com>

* Update the control path to make the in-place incremental restore with block data mover work E2E (#10410)

Update the control path to make the in-place incremental restore with block data mover work E2E

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>

---------

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
Signed-off-by: chlins <chlins.zhang@gmail.com>
Co-authored-by: chlins <chlins.zhang@gmail.com>
2026-08-26 10:21:32 -04:00
Tiger KaovilaiandGitHub ac5744c7b4 docs: move community meeting links to LFX Zoom, add calendar (#10409)
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2026-08-26 07:24:30 -04:00
R4mboandGitHub a3d585f78d stop routing credential selection on AZURE_USERNAME after username/password removal (#10363)
* stop routing credential selection on AZURE_USERNAME after username/password removal

Signed-off-by: samay43 <samayrbhat43@gmail.com>

* add changelog entry

Signed-off-by: samay43 <samayrbhat43@gmail.com>

---------

Signed-off-by: samay43 <samayrbhat43@gmail.com>
2026-08-26 17:57:36 +08:00
+7
Nolan EmirotGitHubblackpigletdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Daniel Jiangcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>dongqingccJoseph Antony VaikathClaude Opus 4.6peter woodmanPierluigi LenociXun Jiangdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Lyndon-LiTiger Kaovilaicopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>Tiger Kaovilai
e33d8a3f84 docs(aws-plugin): update version (#9773)
Run the E2E test on kind / setup-test-matrix (push) Failing after 3s
e2e-test-kind.yaml / extract (push) Failing after 6s
Run the E2E test on kind / get-go-version (push) Failing after 7s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 8s
Main CI / get-go-version (push) Failing after 9s
Main CI / Build (push) Skipped
* docs(aws-plugin): update version

Signed-off-by: emirot <emirot.nolan@gmail.com>

* Add e2e test case for issue 7725

Signed-off-by: dongqingcc <dongqingcc@vmware.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* Add e2e test case for PR 9452

Signed-off-by: dongqingcc <dongqingcc@vmware.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* fix: lint permission issue (#9740)

* fix: lint permission issue

Signed-off-by: emirot <emirot.nolan@gmail.com>

* fix: lint permission issue

Signed-off-by: emirot <emirot.nolan@gmail.com>

* 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>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* Fix wildcard expansion when includes is empty and excludes has wildcards (#9684)

* 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>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* update hashicorp/go-hclog and go-plugin to current version (#9613)

Signed-off-by: Peter Woodman <peter@shortbus.org>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* 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>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* 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>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* Remove Restic code path from PodVolumeRestore.

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

* Bump go.opentelemetry.io/otel from 1.40.0 to 1.41.0

Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
  dependency-version: 1.41.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* 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>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* fix go-releaser upload error

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* add concurrency limit to go-releaser

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* Bump go.opentelemetry.io/otel/sdk from 1.40.0 to 1.43.0 (#9692)

Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.40.0 to 1.43.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.40.0...v1.43.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-version: 1.43.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* fix(lint): fix lint local

Signed-off-by: emirot <emirot.nolan@gmail.com>

* Apply suggestion from @blackpiglet

https://github.com/velero-io/velero/pull/9740/changes#r3151366281

Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>

---------

Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
Signed-off-by: Joseph <jvaikath@redhat.com>
Signed-off-by: Peter Woodman <peter@shortbus.org>
Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
Co-authored-by: Daniel Jiang <daniel.jiang@broadcom.com>
Co-authored-by: Joseph Antony Vaikath <jvaikath@redhat.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: peter woodman <peter@shortbus.org>
Co-authored-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
Co-authored-by: Xun Jiang <xun.jiang@broadcom.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lyndon-Li <lyonghui@vmware.com>
Co-authored-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* Bump github.com/moby/spdystream from 0.5.0 to 0.5.1 (#9734)

* Bump github.com/moby/spdystream from 0.5.0 to 0.5.1

Bumps [github.com/moby/spdystream](https://github.com/moby/spdystream) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/moby/spdystream/releases)
- [Commits](https://github.com/moby/spdystream/compare/v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: github.com/moby/spdystream
  dependency-version: 0.5.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: run go mod tidy to update module files

Agent-Logs-Url: https://github.com/velero-io/velero/sessions/3537c5cb-5e31-405c-a79f-878bd146efa8

Co-authored-by: blackpiglet <59276555+blackpiglet@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Jiang <daniel.jiang@broadcom.com>
Co-authored-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* fix docker hub push error

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* updating aws plugin to a matching version

Signed-off-by: emirot <emirot.nolan@gmail.com>

---------

Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: dongqingcc <dongqingcc@vmware.com>
Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
Signed-off-by: Joseph <jvaikath@redhat.com>
Signed-off-by: Peter Woodman <peter@shortbus.org>
Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
Co-authored-by: dongqingcc <dongqingcc@vmware.com>
Co-authored-by: Daniel Jiang <daniel.jiang@broadcom.com>
Co-authored-by: Joseph Antony Vaikath <jvaikath@redhat.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: peter woodman <peter@shortbus.org>
Co-authored-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
Co-authored-by: Xun Jiang <xun.jiang@broadcom.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lyndon-Li <lyonghui@vmware.com>
Co-authored-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
Co-authored-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Tiger Kaovilai <tkaovila@redhat.com>
2026-08-26 14:46:04 +08:00
2c6f45508c Report a measured zero incremental instead of erasing it (#10309)
Run the E2E test on kind / setup-test-matrix (push) Failing after 4s
e2e-test-kind.yaml / extract (push) Failing after 11s
Run the E2E test on kind / get-go-version (push) Failing after 12s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 7s
Main CI / get-go-version (push) Failing after 8s
Main CI / Build (push) Skipped
* Report a measured zero incremental instead of erasing it

A CBT incremental with an exactly zero delta -- nothing changed since
the parent -- was reported identically to a backup that moved the whole
device. `velero backup describe --details` printed only
"Moved data Size (bytes): 3221225472" with no incremental line, and
status.incrementalBytes was absent, for a run that transferred nothing.
The best possible CBT outcome displayed as the worst, and was
indistinguishable from a genuine full, a whole-device fallback, or a
backup predating incremental accounting.

The zero was being erased twice. Besides the API status fields,
datapath.BackupResult also carried omitempty, and that struct crosses a
JSON boundary from the data mover pod to the controller (see
micro_service_watcher.go), so the value was destroyed before the
controller could persist it. Every uploader always reports a figure
there, so 0 internally always means "transferred nothing" -- dropping
omitempty is sufficient and correct for that hop.

The API fields move to *int64 rather than just dropping omitempty. The
field shipped in v1.18.0-v1.18.2, so backups exist whose stored volume
info has no incrementalSize at all; with a plain int64 those unmarshal
to 0 and would render "Incremental data Size (bytes): 0", a false claim
of a perfect incremental on a run that never measured one. nil means not
measured, a pointer to 0 means measured zero. Both fields already carry
+optional, so the generated CRD schema is unchanged and no regeneration
is required.

Display gates relax from > 0 to != nil in all three places, including
volumesByPod.Add, whose signature takes *int64 now; the restore describer
passes nil, which is correct since restores measure no incremental.

Verified live: the same zero-delta scenario that reported <none> now
reports 0 and renders "Incremental data Size (bytes): 0", while an older
backup described with the new client still correctly prints no
incremental line at all.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
(cherry picked from commit 6c7aa9d588f6d5eab134d4ce19c92b838f45557c)
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

* gofmt: fix import ordering in backup_test.go

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

* Regenerate CRDs for IncrementalBytes pointer type

make update-crd was missed in the original commit. Regenerated with
the pinned controller-gen v0.16.5 to avoid unrelated version-annotation
churn across other CRDs.

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

* Add changelog for #10309

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

* Address review: make IncrementalBytes a pointer to preserve backward compat

Per Lyndon-Li's review on #10309: dropping omitempty on the plain int64
field breaks compatibility with a data mover from release-1.17 or
earlier that predates IncrementalBytes and never writes the key -- the
new controller would unmarshal a zero value ("nothing transferred")
instead of recognizing the field is simply absent ("not measured").

Switch to *int64 with omitempty restored:
- an old mover's omitted key unmarshals to nil ("not measured")
- a current mover's genuine zero still serializes the key, unmarshaling
  to a non-nil pointer to 0 ("measured zero")
- nonzero values work exactly as before
- an old controller can still unmarshal a numeric value from a new mover

pkg/controller/data_upload_controller.go and pod_volume_backup_controller.go
assign the wire-struct field directly to their already-*int64,omitempty
CRD status field instead of re-wrapping it with ptr.To, since both are
now the same pointer type.

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

* Fix CI: update marshal-fail test assertions for IncrementalBytes pointer

Both backup_micro_service_test.go files hardcoded the %v-formatted
zero-value BackupResult struct in an error-message assertion. Now that
IncrementalBytes is *int64, its zero value prints as <nil> instead of 0.

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

---------

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 18:08:17 -04:00
Joseph Antony VaikathandGitHub e14ffe3e4c chore(deps): bump golang.org/x libs to fix CVEs (#10402)
Fixes:
- CVE-2026-56864, CVE-2026-56865: golang.org/x/mod v0.36.0 → v0.40.0
- CVE-2026-46600: golang.org/x/net v0.55.0 → v0.58.0
- CVE-2026-56852: golang.org/x/text v0.37.0 → v0.41.0

Transitive golang.org/x dependencies (crypto, sync, sys, term, tools)
updated accordingly to satisfy version constraints.

Signed-off-by: Joseph <jvaikath@redhat.com>
2026-08-25 15:55:56 -04:00
5b0aa81663 feat(cli): add velero client config set namespace-mode=auto (#10127)
* Issue #3194: Add velero client set-context-as-velero-namespace command

Saves the namespace of the current (or a specified) kubeconfig context
into the Velero client config file, so operational commands default to
it without requiring --namespace on every invocation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: lubronzhan <lubron.zhan@broadcom.com>

* Fix CI: rename changelog to PR number, add unit tests for coverage

- changelogs/unreleased must be named <pr-number>-<username>; rename
  from the 0000 placeholder to 10127 to satisfy hack/changelog-check.sh.
- Extract the command's logic into setContextAsVeleroNamespace so it's
  testable without triggering os.Exit via cmd.CheckError, and add unit
  tests covering: namespace read from context, context with no explicit
  namespace, overwriting an existing config value, and invalid
  kubeconfig path. Addresses 0% codecov patch coverage on the PR.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: lubronzhan <lubron.zhan@broadcom.com>

* Move set-namespace-from-context under client config

Shubham suggested nesting the new command under `config` for
hierarchy consistency, and renaming it since the original
set-context-as-velero-namespace name was long and ambiguous. Moves
it to `velero client config set-namespace-from-context`, matching
the existing config get/set subcommands and my follow-up naming
suggestion on the review thread.

AI-Tool-Used: Claude Code
AI-Tool-Use-Level: Category 3 (Low)
AI-Code-Category: Category 1 (Production)
Signed-off-by: lubronzhan <lubron.zhan@broadcom.com>

* Replace set-namespace-from-context with namespace-mode=auto

kaovilai noted on #10127 that a one-shot command to snapshot the
kubecontext namespace becomes redundant once a config toggle can
resolve it dynamically, and isn't much simpler than the existing
`config set namespace=...` alternative.

Drop the dedicated set-namespace-from-context subcommand and instead
teach the client Factory to resolve the operational namespace from the
current kubeconfig context on every invocation when
`namespace-mode=auto` is set via the existing generic
`config set` command. Explicit --namespace flags and VELERO_NAMESPACE
still take precedence, so the new mode only changes behavior when
neither is set.

AI-Tool-Used: Claude Code
AI-Tool-Use-Level: Category 2 (Medium)
AI-Code-Category: Category 1 (Production)
Signed-off-by: lubronzhan <lubron.zhan@broadcom.com>

* Address PR review: doc, fallback test, t.Setenv

Resolve feedback from PR #10127 review 4966054980:
- Document how to disable namespace-mode=auto (namespace-mode=)
  and note the fallback to the static namespace, in namespace.md.
- Add a factory test covering the fallback to the stored/default
  namespace when kubeconfig namespace resolution fails.
- Switch the VELERO_NAMESPACE override test to t.Setenv, wrapped
  in a subtest so its cleanup runs before later tests execute.

AI-Tool-Used: Claude Code
AI-Tool-Use-Level: Category 2 (Medium)
AI-Code-Category: Category 2 (Non-Production)
Signed-off-by: lubronzhan <lubron.zhan@broadcom.com>

---------

Signed-off-by: lubronzhan <lubron.zhan@broadcom.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 15:23:55 -04:00
Ali AsgharandGitHub 7fce37a0ac Fix e2e cache miss on force push by saving build artifacts explicitly (#9952)
* Fix e2e cache miss on force push by saving artifacts explicitly

actions/cache@v4 writes the cache in a post-job hook that runs after the
job reports completion. The run-e2e-test jobs (needs: build) start as
soon as build completes, before that post-hook save runs, so on a force
push -- where the github.sha-keyed cache has no prior entry -- they
deterministically miss the cache and fail with
'stat velero.tar: no such file or directory'.

Switch the build job's lookups to actions/cache/restore and add explicit
actions/cache/save steps at the end of the job (CLI, image, and MinIO),
so the cache is written before build reports done. The run-e2e-test
reads become actions/cache/restore.

Fixes #9927

Signed-off-by: alliasgher <alliasgher123@gmail.com>

* Add changelog for #9952

Signed-off-by: alliasgher <alliasgher123@gmail.com>

---------

Signed-off-by: alliasgher <alliasgher123@gmail.com>
2026-08-25 18:42:30 +00:00
lyndon-liandGitHub 41687279a8 fix node agent rediness check issue (#10397)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-25 14:14:26 -04:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>kaovilai
2e692dfd3a Validate kind node tags before adding to e2e test matrix (#10390)
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>
2026-08-25 13:25:29 -04:00
Shubham PampattiwarandGitHub 63fbf20cc5 Add readWriteOncePod backupPVC config to enable mount-level SELinux labeling (#10339)
e2e-test-kind.yaml / extract (push) Failing after 10s
Run the E2E test on kind / get-go-version (push) Failing after 11s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 7s
Main CI / get-go-version (push) Failing after 8s
Main CI / Build (push) Skipped
* Add readWriteOncePod backupPVC config to enable mount-level SELinux labeling

On SELinux-enabled clusters the kubelet recursively relabels every file of
the backupPVC at mount time, which can take hours on volumes with a high
file count. Kubernetes avoids this when the volume is ReadWriteOncePod and
the CSI driver advertises SELinux mount support, by mounting with
-o context= instead.

Add an opt-in per-storage-class 'readWriteOncePod' backupPVC config option
that creates the backupPVC with the ReadWriteOncePod access mode and sets
the backup pod's SecurityContext.SELinuxChangePolicy to MountOption. It is
mutually exclusive with 'readOnly', which takes precedence.

Fixes #9873

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

* Add changelog file

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

* Do not set SELinuxChangePolicy for the backup pod

Live testing on OCP 4.22 (k8s 1.35) showed that setting
SecurityContext.SELinuxChangePolicy to MountOption makes backup pod
creation fail outright when the SELinuxMount feature gate is disabled,
which is the default on current clusters:

  Pod is invalid: spec.securityContext.seLinuxChangePolicy:
  Unsupported value: "MountOption": supported values: "Recursive"

The field is also unnecessary. For ReadWriteOncePod volumes the kubelet
already performs mount-level SELinux labeling via the
SELinuxMountReadWriteOncePod feature gate, which has been on by default
since k8s 1.28. Setting the backupPVC access mode to ReadWriteOncePod is
sufficient on its own, and is portable to clusters where the broader
SELinuxMount gate is still off.

Verified on-cluster that the backupPVC is mounted with
context="system_u:object_r:container_file_t:s0:c22,c28" instead of the
recursive seclabel mount used without the flag.

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

---------

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-25 08:32:47 -07:00
CopilotGitHubkaovilaicopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
f6e6e554bc Support /backport 1.17 shorthand and auto-fix changelog filename in backport PRs (#10389)
* Support bare version shorthand in /backport comments

Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>

* Auto-rename changelog filename in backport PRs to match new PR number

Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>

* Copy kind/changelog-not-required label to backport PRs

Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>

* Ensure DCO signoff on every commit in backport PRs

Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>
2026-08-25 10:34:10 -04:00
Xun Jiang/Bruce JiangandGitHub 7bc03b4632 Merge pull request #10338 from blackpiglet/jxun/resolve_duplicate_initCotainer_name
Run the E2E test on kind / setup-test-matrix (push) Successful in 6s
e2e-test-kind.yaml / extract (push) Failing after 9s
Run the E2E test on kind / get-go-version (push) Failing after 10s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 6s
Main CI / get-go-version (push) Failing after 6s
Main CI / Build (push) Skipped
Avoid duplicated InitContainer names generated in velero install CLI.
2026-08-25 13:27:57 +08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
f902e09050 Bump github/codeql-action in the github-actions group (#10366)
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
e2e-test-kind.yaml / extract (push) Failing after 11s
Run the E2E test on kind / get-go-version (push) Failing after 11s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 7s
Main CI / get-go-version (push) Failing after 9s
Main CI / Build (push) Skipped
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 4.37.6 to 4.37.7
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.37.6...v4.37.7)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.37.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-24 15:43:13 -04:00
R4mboandGitHub d374854b0e fix log format string mismatches that produce wrong or mangled output (#10370)
* fix log format string mismatches that produce wrong or mangled output

Signed-off-by: samay43 <samayrbhat43@gmail.com>

* add changelog entry

Signed-off-by: samay43 <samayrbhat43@gmail.com>

---------

Signed-off-by: samay43 <samayrbhat43@gmail.com>
2026-08-24 15:32:56 -04:00
bc49963f1e prevent panic when the restore hook init container command annotation is empty (#10371)
* prevent panic when the restore hook init container command annotation is empty

Signed-off-by: samay43 <samayrbhat43@gmail.com>

* add changelog entry

Signed-off-by: samay43 <samayrbhat43@gmail.com>

---------

Signed-off-by: samay43 <samayrbhat43@gmail.com>
Co-authored-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-08-24 11:24:04 -07:00
cc7b1dbaef Embed CRD manifests via go:embed instead of codegen (#10329)
config/crd/{v1,v2alpha1}/crds/crds.go were generated files that
gzip-compressed the CRD YAML bases into committed []byte literals via
hack/crd-gen, requiring `go generate` and a dedicated CI drift check
(hack/verify-generated-crd-code.sh). This made the files large,
unreviewable in diffs, and a frequent source of merge conflicts.

Replace the generated files with config/crd/{v1,v2alpha1}/crds.go
using `//go:embed bases/*.yaml` to embed the already-committed YAML
manifests directly, decoding them the same way at init. Since Go's
go:embed can't reach outside a file's own directory tree, the crds
package now lives alongside bases/ instead of in a bases-sibling
subdirectory; import paths in pkg/install and pkg/controller were
updated accordingly.

Drop hack/crd-gen and hack/verify-generated-crd-code.sh entirely, and
trim their references from update-3generated-crd-code.sh and the
codespell skip-list. No codegen step remains, so no drift is possible.

Fixes #10328

AI-Tool-Used: Claude Code
AI-Tool-Use-Level: Category 1 (High)
AI-Code-Category: Category 1 (Production)

Signed-off-by: lubronzhan <lubron.zhan@broadcom.com>
Co-authored-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-08-24 14:17:25 -04:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
5c7270a5ad chore: pin helm/kind-action to commit with curl retry fix (#10034)
* Initial plan

* chore: pin helm/kind-action to commit with curl retry fix (PR#165)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-08-24 11:15:42 -07:00
09c1656df9 Skip DeleteSnapshot when ProviderSnapshotID is empty (#9795)
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
e2e-test-kind.yaml / extract (push) Failing after 8s
Run the E2E test on kind / get-go-version (push) Failing after 9s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 7s
Main CI / get-go-version (push) Failing after 8s
Main CI / Build (push) Skipped
When CreateSnapshot fails (e.g. quota limit), the snapshot is recorded
with an empty ProviderSnapshotID. During backup deletion, velero was
calling DeleteSnapshot("") which produces unnecessary 404 API calls.

Skip the DeleteSnapshot call when ProviderSnapshotID is empty and log
a warning instead.

Fixes #9429

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
2026-08-24 10:27:34 -04:00
lyndon-liandGitHub ef9f3ed883 fix repo connection contest of the two repositories with the same storage type (#10344)
- fix repo connection contest between two BSL
- add UT for repo connection contest

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-24 09:21:06 +00:00
R4mboandGitHub 20e24a5d33 translate parent snapshot "auto" to an empty parent snapshot in both data mover micro services (#10357)
* translate parent snapshot "auto" to an empty parent snapshot in both data mover micro services

Signed-off-by: samay43 <samayrbhat43@gmail.com>

* add changelog entry

Signed-off-by: samay43 <samayrbhat43@gmail.com>

---------

Signed-off-by: samay43 <samayrbhat43@gmail.com>
2026-08-24 16:13:53 +08:00
LubronandGitHub d9c25173f7 Fix e2e kind matrix misparsing pre-release node tags (#10359)
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
e2e-test-kind.yaml / extract (push) Failing after 12s
Run the E2E test on kind / get-go-version (push) Failing after 13s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 8s
Main CI / get-go-version (push) Failing after 9s
Main CI / Build (push) Skipped
* Fix e2e kind matrix misparsing pre-release node tags

The setup-test-matrix step excluded "alpha|beta" pre-release tags but
not "rc" ones. A tag like v1.37.0-rc.1 slipped through to the awk
field-splitter, which treats "." as the only separator: splitting
"v1.37.0-rc.1" yields ["v1","37","0-rc","1"], and printing
$1"."$2"."$NF produced the bogus version "v1.37.1" - an image that
was never published, since the real tag is v1.37.0-rc.1.

Replace the two greps with a single anchored pattern that only
matches well-formed vX.Y.Z tags, so any hyphenated pre-release
suffix (rc, alpha, beta, or otherwise) is excluded before reaching
the awk step.

Fixes #10358

AI-Tool-Used: Claude Code
AI-Tool-Use-Level: Category 2 (Medium)
AI-Code-Category: Category 2 (Non-Production)

Signed-off-by: lubronzhan <lubron.zhan@broadcom.com>

* Add changelog entry for e2e matrix fix

AI-Tool-Used: Claude Code
AI-Tool-Use-Level: Category 3 (Low)
AI-Code-Category: Category 2 (Non-Production)

Signed-off-by: lubronzhan <lubron.zhan@broadcom.com>

---------

Signed-off-by: lubronzhan <lubron.zhan@broadcom.com>
2026-08-24 13:45:41 +08:00
d2241adba0 Log the discovered parent snapshot ID, not the empty lookup parameter (#10305)
e2e-test-kind.yaml / extract (push) Failing after 8s
Run the E2E test on kind / get-go-version (push) Failing after 9s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 6s
Main CI / get-go-version (push) Failing after 7s
Main CI / Build (push) Skipped
getParentBackupInfo's parent-selection log lines interpolated the
parentSnapshot parameter. On the discovery branch (no explicit parent
passed by the caller) that parameter is empty by definition, so every
message about which parent was chosen, or why a run fell back to full,
printed no identifier at all -- e.g. "Using parent snapshot , start
time ...". This is the normal path for scheduled/incremental backups,
so the omission hit the common case, not an edge one.

Bind a parentID local that starts as the parameter but is overwritten
once a parent is actually resolved (explicit or discovered), and log
that instead. No behavior change.

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 16:47:40 -04:00
1e26cf7ca0 fix(restore_finalizer): bound WaitRestoreExecHook poll with resourceT… (#10280)
* fix: reuse DefaultResourceTimeout from server config for hook wait

Signed-off-by: Nitish Malang <71919457+nitishmalang@users.noreply.github.com>

* Add changelog for PR 10280

Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>

---------

Signed-off-by: Nitish Malang <71919457+nitishmalang@users.noreply.github.com>
Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
Co-authored-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
2026-08-21 15:15:30 -04:00
PranjalandGitHub a4b8261ffe fix(cli): show n/a for expiration on stalled New backups (#10326)
Backups stuck in New state have no Status.Expiration yet. The CLI
was estimating expiration from CreationTimestamp + TTL, which made
long-queued backups appear already expired.

Fixes #3555

Signed-off-by: PranjalManhgaye <manhgayepranjal@gmail.com>
2026-08-21 15:12:58 -04:00
R4mboandGitHub c20b09e281 fix nil pointer dereference in WaitUntilVSCHandleIsReady when a VSC error has no message (#10352)
* fix nil pointer dereference in WaitUntilVSCHandleIsReady when a VSC error has no message

Signed-off-by: samay43 <samayrbhat43@gmail.com>

* add changelog entry

Signed-off-by: samay43 <samayrbhat43@gmail.com>

---------

Signed-off-by: samay43 <samayrbhat43@gmail.com>
2026-08-21 15:11:09 -04:00
Xun Jiang 00d7e7d022 Avoid duplicated InitContainer names generated in velero install CLI.
Add random string at the end when there is name collision detected.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-08-21 17:41:30 +08:00
3cd6c2e533 Skip signing a download URL when no artifacts can exist yet (#10252)
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
e2e-test-kind.yaml / extract (push) Failing after 9s
Run the E2E test on kind / get-go-version (push) Failing after 11s
push.yml / extract (push) Failing after 6s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
Main CI / get-go-version (push) Failing after 7s
Main CI / Build (push) Skipped
* Skip signing a download URL when no artifacts can exist yet

Reported in #10232: a DownloadRequest for a backup that never ran still
reaches Processed with a signed URL, and fetching it returns 404.

The controller already has the backup, and the restore for restore
targets, in hand before it signs, so checking the phase costs no extra
call to the object store.

The check is deliberately narrow. It refuses only the pre-execution
phases, where nothing has been written for any target kind: New, Queued,
ReadyToStart and FailedValidation for backups, New and FailedValidation
for restores. InProgress onwards may hold a partial log or other
artifacts, and Deleting may still hold all of them, so those keep the
behaviour callers have today.

That matters because velero backup download has no client side phase
check of its own, unlike backup logs and restore logs. Reusing the
allowlist from pkg/cmd/cli/backup/logs.go would have changed what
backup download can fetch; this does not.

A backup with an empty phase is left alone as well, since that state is
transient and the caller can retry.

Refs #10232

Signed-off-by: saral <ilovegojo2580@gmail.com>

* Derive the phase coverage test from the generated CRDs

The previous test built a slice of phases by hand and asserted its own
length, so it passed no matter what the API did. Adding a fourteenth
backup phase would not have failed it.

This reads the status.phase enum out of the generated CRDs, via the
exported v1crds.CRDs that pkg/install already uses. The enum comes from
the same kubebuilder markers as the Go constants, so a phase added to
the API fails here until it is classified.

Verified by removing Deleting from the expectations, which now fails with
'BackupPhase "Deleting" is served by the CRD but not classified'.

Signed-off-by: saral <ilovegojo2580@gmail.com>

* Use US spelling in comments to satisfy the misspell linter

golangci-lint runs misspell, which flags behaviour as a misspelling of
behavior. Comments only, no functional change.

Signed-off-by: saral <ilovegojo2580@gmail.com>

* Set a Failed phase with a reason when the guard refuses to sign

The guard added in the previous commit left the request at New with no URL, so
the CLI polled until its own timeout and then reported that the backup storage
location may be unavailable. The BSL is fine; the backup never ran.

DownloadRequestPhase gains Failed and DownloadRequestStatus gains Message. The
controller sets both where it refuses, and the CLI stops as soon as it sees the
phase and surfaces the message instead of its generic timeout error.

Adding an enum value is additive, per the direction on the PR discussion.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: saral <ilovegojo2580@gmail.com>

---------

Signed-off-by: saral <ilovegojo2580@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 17:26:21 +08:00
Xun Jiang/Bruce JiangandGitHub 42c2c0f1c7 Merge pull request #10325 from PranjalManhgaye/docs/e2e-readme-additional-bsl-mappings
docs(e2e): fix additional BSL make variable mappings
2026-08-21 15:32:23 +08:00
Xun Jiang/Bruce JiangandGitHub 7db7ce7abb Merge pull request #10313 from PranjalManhgaye/fix/pvc-builder-typo
test(e2e): fix pvcBuilder variable typo in pvc helpers
2026-08-21 15:31:45 +08:00
Xun Jiang/Bruce JiangandGitHub cfe733102e Merge pull request #10324 from PranjalManhgaye/test/e2e-apiextensions-typo
test(e2e): fix apiextensions typo in ginkgo description
2026-08-21 15:31:08 +08:00
Xun Jiang/Bruce JiangandGitHub da09de0e34 Merge pull request #10323 from PranjalManhgaye/docs/e2e-readme-typos
docs(e2e): fix typos in e2e test README
2026-08-21 15:30:42 +08:00
Daniel JiangandGitHub 8bbd546167 Double check the label for backup when deleting VSC (#10346)
e2e-test-kind.yaml / extract (push) Failing after 8s
Run the E2E test on kind / get-go-version (push) Failing after 9s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 7s
Main CI / get-go-version (push) Failing after 8s
Main CI / Build (push) Skipped
This commit double checks the label of the VSC on the cluster before
deleting it to avoid mis-deletion.

Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-08-21 11:19:57 +08:00
Shubham PampattiwarandGitHub f27a4ad8c0 Fix LoadAffinity mutation accumulating OS node selector terms (#10342)
e2e-test-kind.yaml / extract (push) Failing after 6s
Run the E2E test on kind / get-go-version (push) Failing after 9s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 2s
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 6s
Main CI / get-go-version (push) Failing after 6s
Main CI / Build (push) Skipped
* Fix LoadAffinity mutation accumulating OS node selector terms

The node-agent parses the loadAffinity configuration once at startup and
keeps it in memory. GetLoadAffinityByStorageClass returned a pointer to one
of the elements of that cached list rather than a copy, so the exposers,
which append a kubernetes.io/os match expression to the returned affinity,
were mutating the shared configuration. Every DataUpload or DataDownload
appended another OS term, growing the data mover pod spec until it could
eventually exceed the object size limit.

Return a deep copy from GetLoadAffinityByStorageClass so that callers can
safely modify the result. A shallow copy is not enough because the
MatchExpressions slice header would still be shared with the source.

Fixes #10341

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

* Add changelog

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

---------

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-20 14:15:56 -04:00
Shubham PampattiwarandGitHub 8359870e2a Merge pull request #10337 from shubham-pampattiwar/docs/backup-restore-pvc-secret-copy
Document secretNames/configMapNames for backup/restore PVC config
2026-08-20 10:49:08 -07:00
Krishna AwasthiandGitHub 1c6d758281 Testing: Implement missing unit tests for pkg/backup/snapshots.go (#10315)
Signed-off-by: opbot_xd <awasthikrishna23052005@gmail.com>
2026-08-20 23:40:59 +08:00
Chlins ZhangandGitHub 9a6346abba Merge pull request #10343 from chlins/fix/no-rerun-synced-backups
Run the E2E test on kind / setup-test-matrix (push) Successful in 7s
e2e-test-kind.yaml / extract (push) Failing after 8s
Run the E2E test on kind / get-go-version (push) Failing after 8s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 7s
Main CI / get-go-version (push) Failing after 8s
Main CI / Build (push) Skipped
Only sync finished backups from object storage
2026-08-20 17:21:37 +08:00
lyndon-liandGitHub e7b15d07d1 Merge pull request #10322 from Lyndon-Li/fill-error-to-cr-when-data-mover-pod-evicted
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
e2e-test-kind.yaml / extract (push) Failing after 7s
Run the E2E test on kind / get-go-version (push) Failing after 8s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 7s
Main CI / get-go-version (push) Failing after 6s
Main CI / Build (push) Skipped
Issue 10321: fill the error to the corresponding CR when data mover pod is evicted
2026-08-20 13:21:18 +08:00
chlins 9afa3964ba Only sync finished backups from object storage
Backup metadata with an empty or New phase was synced into the cluster as a pending backup, which the queue controller then ran as if it were newly requested. Hooks are dropped as well, since a synced backup never executes them.

Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-08-20 10:37:41 +08:00
Shubham Pampattiwar 32fdc9591a Clarify tenant token guidance for encrypted volumes
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-19 14:22:31 -07:00
Shubham Pampattiwar 1e1c9e2648 Document secretNames/configMapNames for backup/restore PVC config
Document the new backupPVC/restorePVC secretNames and configMapNames
options (velero#9920) that copy namespace-scoped secrets/configmaps to
the Velero namespace so datamover can back up and restore encrypted CSI
volumes (e.g. ODF/ceph-csi with Vault KMS). Updates the main and v1.18
docs.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-19 09:33:08 -07:00
Shubham PampattiwarandGitHub fd870efe67 Merge pull request #9920 from shubham-pampattiwar/backup-pvc-secret-copy
Run the E2E test on kind / setup-test-matrix (push) Successful in 5s
e2e-test-kind.yaml / extract (push) Failing after 6s
Run the E2E test on kind / get-go-version (push) Failing after 7s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 6s
Main CI / get-go-version (push) Failing after 6s
Main CI / Build (push) Skipped
Support copying namespace-scoped secrets/configmaps for backup and restore PVC provisioning
2026-08-19 08:01:33 -07:00
Lyndon-Li 223aa0d282 add UT for evicted pod
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-19 18:10:53 +08:00
Daniel JiangandGitHub e9e3054276 Enforce namespace of the "musthave" resources in restore (#10333)
e2e-test-kind.yaml / extract (push) Failing after 11s
Run the E2E test on kind / get-go-version (push) Failing after 11s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 6s
Main CI / get-go-version (push) Failing after 9s
Main CI / Build (push) Skipped
This commit ensures the resources in the set "resourceMustHave" can only
be created in the namespace of velero deployment if it's namespace
scoped.

Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-08-19 17:32:50 +08:00
Lyndon-Li ee6f7b5a97 fix UT error
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-19 16:04:47 +08:00
Lyndon-Li 234a2cb288 handle evicted event
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-19 15:37:56 +08:00
Lyndon-Li 534b2720c2 use atomic.Bool for thread safety
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-19 15:20:47 +08:00
339c8edda9 Detect block uploader cancellation through wrapped errors (#10308)
* Detect block uploader cancellation through wrapped errors

Cancelling a block data mover backup was reported as a failure: the
DataUpload ended Failed with an error message and the Backup went
PartiallyFailed, for a user-requested cancel.

The cause is a sentinel equality check. block.ErrCanceled is raised in
the write loop and then wrapped twice before it reaches the provider --
once in block/uploader.go ("error backing up bdev %s") and again in
block/snapshot.go ("Failed to run uploader backup for si %v") -- so
`err == block.ErrCanceled` can never be true and the ErrorCanceled
returns are unreachable. The filesystem provider avoids this by asking
the uploader for its state (kpUploader.IsCanceled()) rather than
inspecting the error.

Use errors.Is at both the backup and restore sites.

Adds TestBlockProviderCancelThroughWrappedError, which injects the
doubly-wrapped sentinel exactly as production builds it. Note the
assertion is require.ErrorIs, not ErrorContains: provider.ErrorCanceled
and block.ErrCanceled carry identical message text, so a substring
assertion passes whether or not the sentinel was recognised -- which is
why the existing test, injecting the bare sentinel, did not catch this.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
(cherry picked from commit 9d6c5da7a893068d424b0c7896638787c636e213)
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

* Add changelog for #10308

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

* lint: fix misspelling (recognised -> recognized)

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

---------

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 15:03:33 +08:00
Shubham Pampattiwar 2a920ab946 Add RBAC for secrets/configmaps to datamover controllers
The DataUpload and DataDownload controllers now copy and delete
namespace-scoped secrets/configmaps for backup/restore PVC provisioning.
Add the corresponding kubebuilder RBAC markers (get;list;create;delete
on secrets and configmaps) and regenerate the ClusterRole.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar cf04db2705 Use owner UID as backup-pvc-secret label value
The copied secret/configmap label value was the owner (DataUpload/
DataDownload) name, which is derived from the Backup/Restore name and
can exceed the 63-char Kubernetes label-value limit or contain invalid
characters. That would make the copy label and the cleanup selector
diverge and orphan the copied resources.

Use string(ownerObject.UID) consistently for the label value in both
copy and cleanup (backup and restore exposers). The UID is a stable,
always-valid label value.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00