← Back to Pull requests

Add args to override the container arguments of BYOC components #3812

Closed
unknown closed this pull request without merging on Nov 23, 2026 17:52 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 11:41 UTC
Author

Motivation

DatadogBYOCCluster lets the operator bring up a complete BYOC cluster, including the Observability Pipelines Worker that feeds it. The operator sets the container command line for each component (run --service <service> for BYOC components, run for the Worker), and there is no way to change it. Probes and securityContext already have an override that replaces the operator default; the container arguments do not. Running a Worker with a local pipeline file, for testing without a dedicated API, is one case that needs it.

This PR adds that generic override. It follows the design suggested in review on #3651 and supersedes the closed #3651 and #3761.

What does this PR do?

Adds an optional args field to DatadogBYOCClusterComponentSpec. When non-empty, it replaces the default container arguments entirely. Empty or unset args keeps today's behavior.

flowchart LR
    S["spec.args on a component<br/>(cluster component or pipelines[])"] -->|"non-empty"| C["container Args<br/>= spec.args"]
    S -->|"empty or unset"| D["default<br/>run --service &lt;service&gt;"]
    P["pipelines[].args"] -->|"existing deep copy"| W["child Worker spec.args"]
    W -->|"non-empty"| WC["Worker container Args<br/>= spec.args"]
    W -->|"empty or unset"| WD["default<br/>run"]

Key details:

  • One field, every component: DatadogBYOCClusterComponentSpec is inlined into the stateful, compactor, metastore and pipeline specs and into DatadogObservabilityPipelinesWorkerSpec, so the CRDs get args on the indexer, searcher, control plane, janitor, metastore, read-only metastore, compactor, pipelines[] and the Worker.

  • Replaces the default entirely: BYOC components must keep --service <service> in their args, or they will not start as that service.

  • Worker: a cluster's child Worker receives pipelines[].args through the existing DeepCopy in BuildObservabilityPipelinesWorker; there is no new passthrough code, and the copy is not aliased to the cluster's slice.

  • pipelineID must still be a UUID. The Worker validates it at bootstrap even with --skip-key-validation (checked on datadog/observability-pipelines-worker:2.26.0: a non-UUID fails with Pipeline ID is not a valid UUID, a UUID-shaped value passes). It stays required.

  • Code: datadogbyoccluster_types.go (field and regenerated CRDs, deepcopy, openapi), datadogbyoccluster/resources/pod.go, and datadogobservabilitypipelinesworker/resources/workload.go.

  • Not affected: existing resources (the field is optional and the CRD diff against main has no removed lines), RBAC, and any cluster that does not set args.
  • Review order: the type and regenerated CRDs (b0c4038), then pod.go (2809301), then workload.go and the tests (89e1435).

    Additional Notes

  • An args that drops --service <service> on a BYOC component is not rejected; the field doc says it must be kept.

  • Not covered: end-to-end behavior of a custom args on a running cluster.
  • Minimum Agent Versions

    Agent: n/a
    Cluster Agent: n/a

    Describe your test plan

  • go test ./internal/controller/datadogbyoccluster/... ./internal/controller/datadogobservabilitypipelinesworker/... ./api/...: named subtests for default, empty args (falls back to default) and set args on BYOC components and the Worker, plus copy from pipelines[].args to the Worker, not aliased.

  • Removing the len(args) == 0 fallback makes those subtests fail.

  • Integration envtest (go test --tags=integration ./internal/controller -run TestAPIs -ginkgo.focus='DatadogBYOCCluster Controller|DatadogObservabilityPipelinesWorker Controller'): 18 passed, 0 failed.

  • make generate manifests leaves no diff.

  • Staging integration validation: not applicable. API and builder change covered by the tests above; nothing is deployed by this PR.
  • Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies

  • PR has a milestone or the qa/skip-qa label

  • All commits are signed (see: [signing commits][1])
  • [1]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

    🤖 Generated with Claude Code

    Diff: 538 lines (+403 / -135) across 6 files Reviewer: fpddog Review duration: 7571m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 538 lines diff across 6 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.376
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3812"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.9% (MEDIUM) · Higher = larger blast radius
    47.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.9% · Safe to merge
    18.9%