[oadp-1.4] OADP-7829: Add additive extraArgs support for Velero server and node-agent - #2366
Conversation
…agent Cherry-pick of openshift#2230 to oadp-1.4. Adapted for this branch's older structure: types live in api/v1alpha1/oadp_types.go (not dataprotectionapplication_types.go), controllers live in controllers/ (not internal/controller/), and server.Args uses ServerConfig (not ServerFlags). The NodeAgentConfig.DataMoverPrepareTimeout-based test case from the original PR was dropped since that field does not exist on this branch. Adds an extraArgs map[string]string field to VeleroConfig and NodeAgentConfig, merged additively on top of operator-generated defaults (and Args, for Velero), with the unsupported-args annotation still taking highest precedence. Co-authored-by: Shreyash <Shreyashxredhat@users.noreply.github.com> Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
|
@kaovilai: This pull request references OADP-7829 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Codecov Report❌ Patch coverage is Please upload reports for the commit fa0174f to get more accurate results.
Additional details and impacted files@@ Coverage Diff @@
## oadp-1.4 #2366 +/- ##
============================================
+ Coverage 37.79% 38.47% +0.67%
============================================
Files 30 30
Lines 5033 5113 +80
============================================
+ Hits 1902 1967 +65
- Misses 2935 2949 +14
- Partials 196 197 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Joeavaikath, kaovilai, shubham-pampattiwar, sseago The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@kaovilai: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Cherry-pick of #2230 to
oadp-1.4.Why the changes were made
Currently, configuring additional Velero server or node-agent arguments requires using full argument overrides, which forces users to replicate the operator-generated defaults. This approach is difficult to maintain and can lead to configuration drift when defaults change in future releases.
This change introduces a new
extraArgsfield for bothVeleroConfigandNodeAgentConfig. The field allows users to add or override specific command-line arguments while preserving the operator-managed defaults.Key behaviors:
extraArgsare merged with the operator-generated arguments.extraArgs.--flag=valueand--flag valueargument formats.Precedence order:
Adaptation notes for oadp-1.4
This branch's structure differs from
oadp-dev, so the cherry-pick was adapted rather than applied verbatim:api/v1alpha1/oadp_types.go(notdataprotectionapplication_types.go)controllers/(notinternal/controller/)server.ArgsembedsServerConfig(notServerFlags)NodeAgentConfig.DataMoverPrepareTimeouttest case from the original PR since that field doesn't exist on this branchHow to test the changes made
Deploy the operator with this change.
Create a DPA with
extraArgsconfigured:Verify that specifying an existing flag in
extraArgsoverrides the operator-generated value.Run the test suite:
make testNote
Responses generated with Claude