Commit Graph
6583 Commits
Author SHA1 Message Date
Xun Jiang/Bruce JiangandGitHub e354e7aec4 Merge pull request #10138 from Jay2006sawant/fix/block-uploader-and-batchforget-errors
fix: return errors correctly in block restore validation and BatchForget
2026-08-11 11:25:06 +08:00
Xun Jiang/Bruce JiangandGitHub 40de7f9f97 Make backupType case insensitive in the CLI. (#10189)
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
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 6s
Main CI / get-go-version (push) Failing after 7s
Main CI / Build (push) Skipped
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-08-10 16:29:13 -04:00
Jay SawantandGitHub 9a549f781f docs: fix grammar and typos in customize-installation (#10190)
Signed-off-by: Jay2006sawant <jay242902@gmail.com>
2026-08-10 20:10:20 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
476a7ca160 Bump github/codeql-action from 4.37.3 to 4.37.6 (#10203)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.37.3 to 4.37.6.
- [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.3...v4.37.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-10 16:01:37 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ccbb7d1cc7 Bump actions/setup-go from 6 to 7 (#10202)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 6 to 7.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-10 16:01:13 -04:00
harshit sainiandGitHub 943a4d6bb4 docs: fix restore logs command name in self-signed-certificates (#10213)
The list of commands supporting --insecure-skip-tls-verify referred to
`velero restore log`, but the registered command is `velero restore logs`
(pkg/cmd/cli/restore/logs.go). `velero restore log` silently falls through
to the parent command's help text and exits 0, so a user following the docs
gets no logs and no error.

Fixes #10183

Signed-off-by: Harshit saini <harshitsaini1188@gmail.com>
2026-08-10 16:00:54 -04:00
513e93ff4b fix: correct typos in log messages and status strings (#10192)
- Fix 'dataudownload' typo in DataDownload warning log message
  (data_download_controller.go:696)
- Fix 'datadownlad' misspelled structured log field key to 'datadownload'
  (data_download_controller.go:700) - this caused the log field to be
  unqueryable by the correct key name
- Fix 'retrieveable' -> 'retrievable' in BackupRepository maintenance
  status messages (maintenance.go:354, 417)
- Update corresponding test assertion to match corrected string
  (maintenance_test.go:792)

Signed-off-by: shellyco-code <shellyco-code@users.noreply.github.com>
Co-authored-by: shellyco-code <shellyco-code@users.noreply.github.com>
2026-08-10 19:40:02 +00:00
Tiger KaovilaiandGitHub ced051b72f Fix restore-wait init container ignoring pod-level securityContext (#10047)
restore-wait's securityContext fallback chain checked the fs-restore
ConfigMap, then the first container's SecurityContext, then hardcoded
runAsUser 1000. It never consulted pod.Spec.SecurityContext, so pods
that set identity only at the pod level got a helper running as uid
1000 regardless of the workload's actual uid. On volumes where restored
content is owner-only-visible to a non-1000 uid, the helper's stat on
the done-file returns EACCES forever and the pod deadlocks at Init:0/1.

Add pod-level spec.securityContext.runAsUser/runAsGroup as a fallback
between the container-level check and the hardcoded default, since the
workload's own identity is the one that can read what it restored.
Defer to the pod's own RunAsNonRoot setting when runAsUser is 0, since
the hardcoded RunAsNonRoot: true would otherwise contradict a root uid.

Also add a test case covering both container-level and pod-level
SecurityContext set together, confirming container-level still wins.

Fixes #10046

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2026-08-10 15:36:14 -04:00
CopilotandGitHub fb86290def Merge pull request #10208 from velero-io/copilot/edit-autoassign-workflow
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 / 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 7s
Main CI / Build (push) Skipped
Re-request maintainer review when only one CODEOWNERS approval exists
2026-08-10 09:44:01 -07:00
Wenkai Yin(尹文开)andGitHub c9d4501d36 Design for supporting volume data in-place restore (#10014)
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
e2e-test-kind.yaml / extract (push) Failing after 7s
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 7s
Main CI / get-go-version (push) Failing after 8s
Main CI / Build (push) Skipped
* Design for supporting volume data in-place restore

Design for supporting volume data in-place restore

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

* Update the in-place restore design according the comments from internal and community

Update the in-place restore design according the comments from
internal and community

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

* Add namespace-mapping section to clarify how to handle the namespace mapping

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

---------

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2026-08-10 14:20:59 +08:00
cc4161b7ed ci: add backport/cherry-pick GitHub Action for release branches (#10158)
e2e-test-kind.yaml / extract (push) Failing after 5s
Run the E2E test on kind / get-go-version (push) Failing after 5s
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 7s
Main CI / Build (push) Skipped
* ci: add backport/cherry-pick GitHub Action for release branches

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>

* ci: add unreleased changelog for backport Action

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>

* ci: pin backport-action to commit SHA for write-permission safety

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>

* ci: address review nits on backport workflow

Move permissions to the job (least privilege), document the
backport-action bot user id guard, and fix a garbled comment.

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>

---------

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>
Co-authored-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>
2026-08-09 11:01:32 -05:00
22ae12575c Fix excluded namespace objects leaking into backup with cross-namespa… (#10159)
* Fix excluded namespace objects leaking into backup with cross-namespace listing

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>

* Add changelog for PR 10159

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>

---------

Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>
Co-authored-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>
2026-08-09 10:15:29 -05:00
Xun Jiang/Bruce JiangandGitHub 7346ec527c Merge pull request #10175 from Lyndon-Li/update-protocol-buffer-code-2
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 / setup-test-matrix (push) Successful in 2s
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 5s
Main CI / get-go-version (push) Failing after 7s
Main CI / Build (push) Skipped
Update protocol buffer code
2026-08-07 11:10:41 +08:00
Lyndon-Li 66b637e398 update protocol buffer code
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-06 09:36:28 +00:00
Chlins ZhangandGitHub a5c14755d1 Merge pull request #10102 from chlins/fix/archive-item-path-containment
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 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 5s
Main CI / get-go-version (push) Failing after 6s
Main CI / Build (push) Skipped
Verify extracted item paths stay inside the backup directory
2026-08-06 15:02:57 +08:00
Joseph Antony VaikathandGitHub 8850862e9e Merge pull request #9697 from Joeavaikath/add-nodeagent-check-datamover
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
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 9s
Main CI / Build (push) Skipped
Fast-fail backup when built-in data mover has no running node-agent
2026-08-05 12:38:36 -07:00
JosephandClaude Opus 4.6 64079056b7 Fast-fail backup when built-in data mover has no running node-agent
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joseph <jvaikath@redhat.com>
2026-08-05 11:48:39 -07:00
Joseph Antony VaikathandGitHub 3775abc37c Merge pull request #9720 from Joeavaikath/feature/dynamic-cli-completion
Add dynamic resource autocompletion to Velero CLI
2026-08-05 08:32:12 -07:00
80440f5d5a Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
2026-08-05 08:17:44 -07:00
JosephandClaude Opus 4.6 3c49bbec75 Add dynamic resource autocompletion to Velero CLI
Register cobra completion callbacks for all commands that accept
existing Velero resource names. A centralized completeNames helper
uses apimachinery's meta.ExtractList/Accessor to list resources with
a 3-second timeout, filter by prefix, and deduplicate already-typed
arguments. Wires ValidArgsFunction on 20 commands and
RegisterFlagCompletionFunc on 9 flags across backup, restore,
schedule, backuplocation, snapshotlocation, repo, and debug.

Closes #9782

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Joseph <jvaikath@redhat.com>
2026-08-05 08:17:44 -07:00
Shubham PampattiwarandGitHub f73888abbd Add snapshotClass parameter to volume policy snapshot action (#10070)
* Add SnapshotClassParameter constant and GetSnapshotClass getter

Add a new snapshotClass action parameter to volume policies, allowing
users to specify which VolumeSnapshotClass to use for CSI snapshots.
This follows the existing dataMover parameter pattern with a typed
constant and getter method on the Action struct.

Ref: #8807

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

* Add snapshotClass parameter validation

Validate the snapshotClass parameter in Action.validate(): it must only
appear on snapshot actions, must be a string, and must not be empty.
Follows the same validation pattern as the dataMover parameter.

Ref: #8807

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

* Add volume policy tier to VolumeSnapshotClass selection

Add GetVolumeSnapshotClassFromVolumePolicy helper and extend
GetVolumeSnapshotClass with a policySnapshotClass parameter. The new
tier sits between PVC annotation and backup annotation in the priority
chain: PVC annotation > volume policy > backup annotation > VSC label.

Ref: #8807

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

* Wire snapshotClass from volume policy through CSI plugin

In pvcBackupItemAction.Execute, call GetActionParameters to extract the
snapshotClass from the matched volume policy and pass it through
getVolumeSnapshotReference and createVolumeSnapshot to
GetVolumeSnapshotClass. This connects the volume policy parameter to
the CSI snapshot creation path.

Fixes #8807

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

* Add changelog for PR #10070

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

* Document snapshotClass volume policy parameter

Add documentation for the new snapshotClass parameter in the volume
policy snapshot action. Update the CSI docs to include volume policy
as a tier in the VolumeSnapshotClass selection priority, and add
Example 6 to resource-filtering.md showing multi-array usage.

Ref: #8807

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

* Fix import ordering in pvc_action.go

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

* Add end-to-end test for snapshotClass volume policy parameter

Verify that when a volume policy specifies snapshotClass, the CSI
plugin creates a VolumeSnapshot using that VolumeSnapshotClass. The
test uses a VSC without the velero label to confirm selection comes
from the volume policy parameter, not the label-based fallback.

Ref: #8807

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

* Fix gofmt struct field alignment in pvc_action_test.go

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

* Add GetSnapshotClass to VolumeHelper interface

Add a GetSnapshotClass method to VolumeHelper that encapsulates the
extraction of the snapshotClass parameter from volume policy actions.
This avoids requiring callers to parse raw parameters from
GetActionParameters. Simplify the CSI plugin to use the new method.

Ref: #8807

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

* Fix gofmt formatting in resource_policies.go

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

---------

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-05 08:13:59 -07:00
Chlins ZhangandGitHub 02bff1e771 Merge pull request #10141 from chlins/fix/pin-e2e-third-party-sources
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
e2e-test-kind.yaml / extract (push) Failing after 4s
Run the E2E test on kind / get-go-version (push) Failing after 6s
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 8s
Main CI / Build (push) Skipped
Pin e2e third-party clones to reviewed commits
2026-08-05 11:16:37 +08:00
AftAb-25andGitHub ca72c2e7e2 Fix missing gcFailureBSLUnavailable label during garbage collection (#10154)
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
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 5s
Main CI / get-go-version (push) Failing after 6s
Main CI / Build (push) Skipped
* Fix gcFailureBSLUnavailable label not applied (Issue #10153)

Signed-off-by: aftab <aftab123215@gmail.com>

* Fix linter error: use require.NoError before checking label

Signed-off-by: aftab <aftab123215@gmail.com>

---------

Signed-off-by: aftab <aftab123215@gmail.com>
2026-08-04 13:06:45 -04:00
UajjawalandGitHub cf6202be46 docs: document ownership loss on mount-constant filesystems (#10044) (#10147)
Signed-off-by: wolf-06 <Uajjawal.06@gmail.com>
2026-08-04 10:47:21 -04:00
e1cd2b8266 docs: update community page backlog links away from classic projects (#10157)
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 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 6s
Main CI / get-go-version (push) Failing after 8s
Main CI / Build (push) Skipped
Signed-off-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>
Co-authored-by: Pragati <Pragati5-DEBUG@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 09:52:15 -04:00
Chlins ZhangandGitHub b4b72a3562 Add regression test for additional item with invalid JSON (#10103)
archive.Unmarshal returns (nil, err) when an item file contains malformed
JSON, and restoreItem dereferences its obj argument on entry, so an
additional item that fails to unmarshal must be skipped rather than passed
on. The loop only records the error and continues today; nothing covers
that, so removing the continue reintroduces a nil pointer dereference in
the restore reconciler without failing any test.

The item file is added to the tarball so the existing Stat check passes and
the unmarshal is actually reached.

Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-08-04 09:50:37 -04:00
Jay2006sawant b2dea8d169 chore: add one-line changelog for PR 10138
Signed-off-by: Jay2006sawant <jay242902@gmail.com>
2026-08-04 14:49:08 +05:30
lyndon-liandGitHub b8db629c26 Merge pull request #10149 from shubham-pampattiwar/site/v1.18-release-blog
Site: add release blog posts for v1.17 and v1.18
2026-08-04 16:52:28 +08:00
Xun Jiang/Bruce JiangandGitHub 9b34594cd3 Merge pull request #10133 from velero-io/dependabot/github_actions/actions/checkout-7
Bump actions/checkout from 6 to 7
2026-08-04 16:44:50 +08:00
Adam ZhangandGitHub 094a183d94 Merge pull request #10016 from adam-jian-zhang/restore-filters-guide
add documentation for fine-grained restore filters
2026-08-04 16:06:03 +08:00
lyndon-liandGitHub 0e8664a018 Merge pull request #10106 from blackpiglet/jxun/cbt_modification
Fix some issues for CBT features:
2026-08-04 16:02:11 +08:00
lyndon-liandGitHub 23a0cbe163 add incremental size for block uploader (#10151)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-08-04 16:00:45 +08:00
Xun Jiang/Bruce JiangandGitHub 4548e5eb9e Merge pull request #10134 from velero-io/dependabot/github_actions/docker/setup-buildx-action-4
Bump docker/setup-buildx-action from 3 to 4
2026-08-04 16:00:23 +08:00
Chlins ZhangandGitHub 0e16235a9b Merge pull request #10150 from chlins/fix/data-mover-drop-host-mounts
Drop node-agent host path mounts from data mover pods
2026-08-04 15:41:10 +08:00
Xun Jiang/Bruce JiangandGitHub 4f1456f7de Merge pull request #10116 from wolf-06/enhance/Make/help
add auto-documenting help command to Makefile
2026-08-04 15:18:33 +08:00
de32d93b8e Fix ResourceDeletionStatusTracker key Kind mismatch in terminating-namespace wait (#9987)
EnsureNamespaceExistsAndIsReady wrote the tracker key with namespace.Kind
(getNamespace() sets Kind=Namespace) but read it with clusterNS.Kind
(client.Get strips TypeMeta -> Kind=empty). The keys never matched, so the
skip-path never fired and every item in a terminating namespace paid the full
--terminating-resource-timeout wait (per-resource instead of per-namespace).

Use the passed-in namespace object for Contains so Add/Contains keys match.
Add a regression test that reproduces the production Kind divergence.

Signed-off-by: Shashank1306s <shashasingh@microsoft.com>
Co-authored-by: Shashank1306s <shashasingh@microsoft.com>
Co-authored-by: Priyansh Choudhary <im1706@gmail.com>
2026-08-03 23:28:01 -07:00
Xun Jiang 11545ee63c Fix logs, CRD, and GetDataMover for CBT features.
Modify the logs.
Modify the CRD's data mover's comment.
Modify the resource policy's GetDataMover for default data mover case.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-08-04 06:25:05 +00:00
chlins bfda68ca3a Address review comments on host path exclusion
Detect the host path volumes by their source instead of their name, so the customized ones are excluded as well. Drop the container capability changes since the data mover needs them to access the data, and fix the copyright headers.

Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-08-04 14:22:01 +08:00
chlins 0eec47e574 Drop node-agent host path mounts from data mover pods
The CSI snapshot and generic restore exposers access data through PVCs, so they no longer inherit the node-agent host path volumes. Also drop all capabilities on the data mover container.

Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-08-04 13:48:57 +08:00
Shubham PampattiwarandGitHub ff0876a56d Merge pull request #10098 from shubham-pampattiwar/impl/default-resource-modifier
Run the E2E test on kind / setup-test-matrix (push) Successful in 6s
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) Successful in 12s
Main CI / get-go-version (push) Successful in 13s
Main CI / Build (push) Failing after 23s
Implement server default restore resource modifier
2026-08-03 18:17:14 -07:00
Shubham Pampattiwar 738dfe8bb9 site: add blog posts for Velero v1.17 and v1.18 releases
Add release blog posts for v1.17 (Sep 2025) and v1.18 (Mar 2026)
covering major features, breaking changes, and community contributions.

v1.17 highlights: VolumeGroupSnapshot support, modernized fs-backup,
Windows cluster support, priority class support.

v1.18 highlights: concurrent backup processing, cache volume support
for data movers, incremental backup size reporting, VolumePolicy
enhancements.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-03 15:52:31 -07:00
Shubham Pampattiwar b025fe3a9b Add test for DefaultResourceModifierConfigMap in AllResources
Verify the --default-resource-modifier-configmap flag is wired through
VeleroOptions to the deployment args via AllResources.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-03 13:22:09 -07:00
Shubham Pampattiwar ee2c3a4cd2 Add test coverage for --skip-default-resource-modifier CLI flag
Add the flag to the existing TestCreateCommand test to verify flag
binding and option parsing.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-03 13:19:48 -07:00
Shubham Pampattiwar bd95633967 Add skip log and improve test coverage
- Log when SkipDefaultResourceModifier skips the default modifier
- Add test for unsupported ResourceModifier Kind (warns, does not
  apply default)
- Add test for default ConfigMap with invalid rules (validation
  failure is non-fatal)
- loadResourceModifierConfigMap now at 100% coverage

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-03 13:19:48 -07:00
Shubham Pampattiwar 2be71e3c3b Add docs, example ConfigMap, describer, and review fixes
- Add Default Resource Modifiers section to restore-resource-modifiers.md
- Add --default-resource-modifier-configmap to customize-installation.md
- Add examples/default-resource-modifier-cni.yaml with CNI annotation
  stripping rules for OVN-K and Multus
- Update restore describer to show SkipDefaultResourceModifier when set
- Log warning when ResourceModifier Kind is not ConfigMap instead of
  silently doing nothing
- Add deployment_test.go coverage for the new server flag

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-03 13:19:48 -07:00
Shubham Pampattiwar a6f800c591 Address review feedback on default resource modifier
- Fix fallthrough bug: when ResourceModifier is set with a non-ConfigMap
  kind, do not fall through to applying the server default. The outer
  check on ResourceModifier != nil now prevents default application
  regardless of the Kind value.
- Include underlying error in fatal validation message for ConfigMap
  retrieval failures.
- Strengthen exclusive precedence test: default ConfigMap intentionally
  does not exist while per-restore does, proving the default is never
  consulted.
- Add test for invalid default ConfigMap data (non-fatal, warn and
  proceed).

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-03 13:19:48 -07:00
Shubham Pampattiwar d87a66393d Add changelog for PR #10098
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-03 13:19:48 -07:00
Shubham Pampattiwar c509e5369c Wire default resource modifier through install path and builder
Add --default-resource-modifier-configmap to the install CLI and
deployment builder so administrators can configure it during velero
install. Wire through VeleroOptions and podTemplateConfig following
the existing --backup-repository-configmap pattern.

Add SkipDefaultResourceModifier builder method to RestoreBuilder.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-03 13:19:47 -07:00
Shubham Pampattiwar 34bc3c7e1a Add --skip-default-resource-modifier flag to restore CLI
When set, the server-configured default resource modifier is skipped
for this restore. Only sets the *bool field when the flag is true,
leaving it nil otherwise.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-03 13:19:47 -07:00
Shubham Pampattiwar 8ef8ab3b1d Implement default resource modifier in restore controller
Thread DefaultResourceModifierConfigMap from server config through to
restoreReconciler. Refactor validateAndComplete to use a shared
loadResourceModifierConfigMap helper that handles both default and
per-restore ConfigMap loading.

Precedence: per-restore modifier takes exclusive precedence over the
default. Default ConfigMap errors are non-fatal (warn and proceed).
SkipDefaultResourceModifier opt-out is respected.

Includes unit tests covering: default-only, per-restore override,
skip flag, missing default (non-fatal), missing per-restore (fatal),
and no modifier configured.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-08-03 13:19:47 -07:00