Add args to override the container arguments of BYOC components #3812
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
fpddog
Motivation
DatadogBYOCClusterlets 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,runfor the Worker), and there is no way to change it. Probes andsecurityContextalready 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
argsfield toDatadogBYOCClusterComponentSpec. When non-empty, it replaces the default container arguments entirely. Empty or unsetargskeeps today's behavior.Key details:
DatadogBYOCClusterComponentSpecis inlined into the stateful, compactor, metastore and pipeline specs and intoDatadogObservabilityPipelinesWorkerSpec, so the CRDs getargson the indexer, searcher, control plane, janitor, metastore, read-only metastore, compactor,pipelines[]and the Worker.--service <service>in theirargs, or they will not start as that service.pipelines[].argsthrough the existingDeepCopyinBuildObservabilityPipelinesWorker; there is no new passthrough code, and the copy is not aliased to the cluster's slice.pipelineIDmust still be a UUID. The Worker validates it at bootstrap even with--skip-key-validation(checked ondatadog/observability-pipelines-worker:2.26.0: a non-UUID fails withPipeline ID is not a valid UUID, a UUID-shaped value passes). It stays required.datadogbyoccluster_types.go(field and regenerated CRDs, deepcopy, openapi),datadogbyoccluster/resources/pod.go, anddatadogobservabilitypipelinesworker/resources/workload.go.mainhas no removed lines), RBAC, and any cluster that does not setargs.Review order: the type and regenerated CRDs (
b0c4038), thenpod.go(2809301), thenworkload.goand the tests (89e1435).Additional Notes
argsthat drops--service <service>on a BYOC component is not rejected; the field doc says it must be kept.argson 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, emptyargs(falls back to default) and setargson BYOC components and the Worker, plus copy frompipelines[].argsto the Worker, not aliased.len(args) == 0fallback makes those subtests fail.go test --tags=integration ./internal/controller -run TestAPIs -ginkgo.focus='DatadogBYOCCluster Controller|DatadogObservabilityPipelinesWorker Controller'): 18 passed, 0 failed.make generate manifestsleaves no diff.Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel[1]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits
🤖 Generated with Claude Code