Skip to content

Feature request: Additive extraArgs for Velero server and node-agent #2209

@kaovilai

Description

@kaovilai

Problem

All three current mechanisms for configuring Velero server args are full overrides, not additive:

  1. Operator defaults (Layer A) — built from individual DPA spec fields (logLevel, itemOperationSyncFrequency, resourceTimeout, etc.)
  2. spec.configuration.velero.args (Layer B) — replaces ALL Layer A defaults. Code explicitly says "we are overriding args, so recreate args from scratch"
  3. oadp.openshift.io/unsupported-velero-server-args annotation + ConfigMap (Layer C) — replaces everything from both Layer A and Layer B

Customers who need to add a single extra flag (e.g., a custom timeout or debug option) must reproduce the entire default args list in their override, which is fragile and version-dependent. If the operator adds new default flags in an upgrade, the customer's override silently drops them.

This gap was surfaced in OADP-7829 (support case 04410122).

Proposed solution

Add extraArgs field to VeleroConfig (and NodeAgentConfig for symmetry) that appends to the operator-computed defaults rather than replacing them:

spec:
  configuration:
    velero:
      extraArgs:
        some-custom-flag: "value"
        another-flag: "true"
    nodeAgent:
      extraArgs:
        some-node-agent-flag: "value"

Behavior

  • extraArgs is applied after all operator defaults (and after args if set)
  • If the same flag appears in both defaults and extraArgs, extraArgs value wins (last-writer-wins dedup by flag name)
  • When the unsupported-args annotation is present, it still takes highest priority (existing behavior)
  • extraArgs is a map[string]string — keys are flag names (without -- prefix), values are flag values

Implementation scope

  • API: Add ExtraArgs map[string]string to VeleroConfig and NodeAgentConfig in api/v1alpha1/dataprotectionapplication_types.go
  • Controller: Add mergeExtraArgs() helper called at end of customizeVeleroContainer() and node-agent equivalent
  • Tests: Unit tests for merge logic, deduplication, and interaction with existing args field

Risks and mitigations

Risk Mitigation
Duplicate flags mergeExtraArgs deduplicates by flag name, extraArgs wins
Overriding operator-critical flags Document which flags should not be overridden; optionally log warning
Interaction with args field extraArgs applies after args, composable. Document precedence
Invalid flag names Velero validates at startup (same as ConfigMap approach)

Note

Responses generated with Claude

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions