Commit Graph
3157 Commits
Author SHA1 Message Date
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
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
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
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
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
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 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
Shubham Pampattiwar 9fd5365b15 Copy namespace-scoped secrets/configmaps for restore PVC provisioning
Mirror the backup-side fix on the restore path. The generic restore
exposer creates the intermediate restore PVC in the Velero namespace
using the target PVC's StorageClass. For encrypted volumes this fails
because ceph-csi looks up the KMS token secret in the PVC's namespace
(the Velero namespace), where it does not exist.

Add SecretNames/ConfigMapNames to the RestorePVC config. When set, the
generic restore exposer copies the named secrets/configmaps from the
target namespace to the Velero namespace before creating the restore
PVC, and cleans them up in CleanUp(). Reuses the same copy/delete
helpers and label as the backup path.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar f457a95802 Remove unused DeleteSecretIfAny/DeleteConfigMapIfAny helpers
These single-object delete helpers were introduced earlier but are no
longer called in production code: DeleteSecretsWithLabel and
DeleteConfigMapsWithLabel now delete inline with UID preconditions.
Remove the dead functions and their tests.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar e498c5f79b Address review: generic labels param and copy placement
- Make CopySecret/CopyConfigMap accept a generic labels map instead of
  hardcoding the backup-pvc-secret label, aligning with the generic
  DeleteSecretsWithLabel helper. Move the BackupPVCSecretLabel constant
  from util/kube to the exposer package where it is used.
- Move the secret/configmap copy in Expose() to after
  WaitVolumeSnapshotReady and before createBackupVS. That is the most
  likely failure point, and nothing needs cleanup before it.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar eda695ae3a Fix linter issues: gofmt alignment and require.Error
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar 2df1386d08 Add tests for secret/configmap copy in Expose and CleanUp
Add test cases for the CSI snapshot exposer:
- TestExpose_SecretCopy: verifies secret copy, configmap copy, and
  error on missing source secret during Expose()
- TestCleanUp_SecretsAndConfigMaps: verifies label-based cleanup
  deletes owned resources and preserves unrelated ones

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar 7db0b391ff Address review feedback: ownership, BinaryData, preconditions, placement
- Fix premature deletion of shared secrets/configmaps: check owner label
  in addition to data equality. Same data + different owner is now a
  collision, preventing one DataUpload's CleanUp from removing resources
  another DataUpload is still using.
- Copy BinaryData in CopyConfigMap and include it in the equality check,
  so configmaps with binary payloads (e.g., CA bundles) are not silently
  truncated.
- Add UID preconditions to DeleteSecretsWithLabel and
  DeleteConfigMapsWithLabel to avoid TOCTOU races where a recreated
  object with the same name could be deleted.
- Move secret/configmap copy to the beginning of Expose(), before any
  intermediate objects are created, so failure doesn't require cleanup.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar 6e536a451a Add tests for configmap copy/delete utilities
Add unit tests for CopyConfigMap, DeleteConfigMapIfAny, and
DeleteConfigMapsWithLabel mirroring the existing secret tests.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar 986350a6e5 Move secret/configmap copy from controller to CSI snapshot exposer
Move the secret and configmap copy logic from the DataUpload controller
into the CSI snapshot exposer's Expose() method. This keeps all
CSI-specific logic in the exposer and maintains symmetry with CleanUp()
which already handles the cleanup of copied resources.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar c15cf084e3 Add configmap copy support and move secret copy after accept
- Add ConfigMapNames field to BackupPVC config for copying tenant
  configmaps (e.g., ceph-csi-kms-config with Vault connection overrides)
- Add CopyConfigMap, DeleteConfigMapIfAny, DeleteConfigMapsWithLabel
  utilities mirroring the secret copy functions
- Move secret/configmap copy after acceptDataUpload() so only the
  accepting node handles it, avoiding multi-node contest
- Clean up copied configmaps in CleanUp() alongside secrets

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar f91f669e77 Fix linter issues in secret utilities
- Fix import ordering in test file (gofmt)
- Add nolint:gosec for BackupPVCSecretLabel constant (not a credential)
- Use assert.Error instead of assert.True(err != nil) (testifylint)

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar 9028c34ba0 Clean up copied secrets in CSI snapshot exposer CleanUp
Add label-based secret cleanup in CleanUp() to delete any secrets
that were copied to the Velero namespace for backup PVC provisioning.
Uses the velero.io/backup-pvc-secret label to find secrets associated
with the DataUpload being cleaned up.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar 2a44048024 Copy secrets before Expose in DataUpload controller
Copy configured secrets from the source namespace to the Velero
namespace in the New phase of the DataUpload reconcile loop, before
calling Expose(). This is done in the controller rather than the
exposer because Expose() errors are non-retryable (marked as permanent
failure), while the controller can requeue on collision.

On secret collision (same name, different data from another
DataUpload), the controller requeues with a 5s delay, matching the
existing pattern used for VGDP constraint checking.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar f65652bfc3 Add secret copy utilities for backup PVC provisioning
Add CopySecret, DeleteSecretIfAny, and DeleteSecretsWithLabel utilities
for copying namespace-scoped secrets to the Velero namespace during
datamover backup PVC creation.

CopySecret handles three cases:
- Secret does not exist in target: copies it with a tracking label
- Secret exists with same data: no-op (same source namespace)
- Secret exists with different data: returns ErrSecretCollision so the
  caller can requeue

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Shubham Pampattiwar 110b38ecde Add SecretNames field to BackupPVC config
Add a SecretNames field to the BackupPVC type to allow users to specify
secrets that need to be copied from the source PVC namespace to the
Velero namespace before creating the backup PVC. This is needed for CSI
drivers that require namespace-scoped secrets for volume provisioning,
such as encrypted volumes with KMS.

Fixes #9879

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-18 10:28:27 -07:00
Daniel JiangandGitHub 763f3a1db4 Avoid io.ReadAll in buildFinalTarball() (#10311)
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
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 / 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
This commit updates the func buildFinalTarball so it won't use
io.ReadAll, in order to optimize memory usage.

Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-08-18 16:41:22 +08:00
Lyndon-Li 7b8b54ebbb fill the error to the corresponding CR when data mover pod is evicted
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-18 16:09:32 +08:00
lyndon-liandGitHub 9835559c60 Merge pull request #10269 from blackpiglet/jxun/remove_pvc_pv_check_for_pvr_creation
Remove PVC and PV inclusion check during creating PVR.
2026-08-18 15:10:04 +08:00
lyndon-liandGitHub fa95eb0aa7 Full backup for all data movers (#10185)
* support full backup for fs data mover

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

* full backup for PVB

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

* full backup for all data movers

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

* fix UT error

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

---------

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-18 13:08:41 +08:00
Joseph Antony VaikathandGitHub 6256b4fcb4 Merge pull request #10317 from opbot-xd/fix-uninstall-wait-flag
Run the E2E test on kind / setup-test-matrix (push) Successful in 10s
e2e-test-kind.yaml / extract (push) Failing after 8s
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 7s
Main CI / get-go-version (push) Failing after 8s
Main CI / Build (push) Skipped
Cleanup: Remove deprecated --wait flag from velero uninstall
2026-08-17 21:36:35 -07:00
R4mboandGitHub 526ea5ef00 assert expected errors from the test case rather than the returned error (#10312)
* assert expected errors from the test case rather than the returned error

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-18 00:25:36 -04:00
opbot_xd 89da479796 Cleanup: Remove deprecated --wait flag from velero uninstall #10316
Signed-off-by: opbot_xd <awasthikrishna23052005@gmail.com>
2026-08-18 03:40:05 +05:30
RalthosandGitHub 53ba2e96d7 Add printer columns for DownloadRequest and ServerStatusRequest (#10229)
DownloadRequest and ServerStatusRequest were the last two Velero CRDs
without printer columns, so kubectl showed only NAME and AGE for both.

DownloadRequest gains the target kind and name, its phase, and age.
ServerStatusRequest gains its phase, the reported server version, the
time the controller processed it, and age.

status.downloadURL is deliberately left out: it is a pre-signed URL that
grants access to the object, and a default list view is the wrong place
for it. status.expiration is left out because kubectl renders a date
column as time elapsed, so a future timestamp prints <invalid>.

Signed-off-by: saral <ilovegojo2580@gmail.com>
2026-08-17 16:55:29 +08:00
R4mboandGitHub b8de7ba506 fix nil pointer dereference in EnsureDeleteVS and EnsureDeleteVSC timeout paths (#10292)
* fix nil pointer dereference in EnsureDeleteVS and EnsureDeleteVSC timeouts

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-17 16:55:14 +08:00
lyndon-liandGitHub da5bee7097 Use thread safe map for cancel recorder (#10255)
* use thread safe map for cancel recorder

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

* use atomic load and store

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

---------

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-17 16:55:01 +08:00
lyndon-liandGitHub d4e62bb979 Add cap for backup data extraction (#10260)
* add cap for backup data extraction

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

* set default extraction size

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

* control total size only

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

* add doc for max-backup-extraction-size

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

---------

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-17 16:29:42 +08:00
lyndon-liandGitHub adc35b635c Cap the unzip of metadata download to avoid OOM kill (#10258)
* cap the unzip of metadata download to avoid oom kill

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

* detect when EOF is retuend because of cap

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

---------

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-17 16:29:01 +08:00
lyndon-liandGitHub ff4783470e cap the metadata decompression in object store (#10270)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-17 16:19:55 +08:00