argo_workflows: add container-based config discovery support - #24886
argo_workflows: add container-based config discovery support#24886vitkyrka wants to merge 4 commits into
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 5d766eb | Docs | View more details | Give us feedback! |
evalya-impact-summaryevalya impact analysis |
39a6537 to
ab4ef17
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab4ef17161
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Ports the generic discovery-strategy spec-tooling (a `from_named_ports` strategy and its `discovery/openmetrics_from_named_ports` template) and a generic Kubernetes discovery-stability E2E harness (`datadog_checks_dev/dev/kubernetes.py`), then wires up argo_workflows to use them: a discovery block and `auto_conf.yaml` file entry in spec.yaml, regenerated config models, an `auto_conf` metadata key in the E2E fixture so the Kubernetes Agent backend mounts the discovery template, and new discovery E2E tests. Bumps the `datadog-checks-base` floor to >=38.0.0 for `candidate_ports_by_name`. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…overy_candidates_stable_kubernetes Flagged by Codex review: the top-level Kubernetes discovery-stability helper's container_name= argument was only exercised indirectly via the private _build_service_from_pod helper, not end-to-end through the public function. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Addresses the two findings from the automated Codex review on PR #24886: - _build_service_from_pod built a bare SimpleNamespace host string, so IPv6 pod IPs produced malformed, unbracketed URLs in generated discovery candidates (and since candidate errors are swallowed by the stability-check loop, this could pass silently). Wrap the host in a small local Host-like class that brackets IPv6 literals for URL templates, mirroring datadog_checks.base.utils.discovery.Host without taking a dependency on datadog_checks_base (not a declared dependency of datadog_checks_dev). - The array[string] strategy-input validator accepted `port_names: []` or blank-string entries, which pass spec validation but make candidate_ports_by_name yield zero candidates at runtime, silently. Require at least one non-empty string. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ab4ef17 to
5d766eb
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Validation ReportAll 21 validations passed. Show details
|
What does this PR do?
Adds Kubernetes container-based config discovery support to
argo_workflows, the first integration to combine config discovery with the repo's new Kubernetes Agent E2E backend (#24639, #24827).The port is taken from the
metricsnamed container port.The AD identifier
workflow-controlleris a generic name that could be used by something even not from Argo, so a CEL selector narrows the image reference further down to something that containsargoproj/workflow-controller.This also ports two pieces of shared, integration-agnostic infrastructure needed to make this work on the new Kubernetes Agent backend:
from_named_portsdiscovery strategy and itsdiscovery/openmetrics_from_named_portstemplate (datadog_checks_dev), matching the existingfrom_portsstrategy but keyed by container port name instead of number.datadog_checks_dev/dev/kubernetes.py), which asserts a target workload pod stays stable while every generated discovery candidate is probed, and delegates check execution to the existingdd_agent_check/dd_agent_check_discoveryfixtures rather than spinning up a separate Agent pod.Motivation
https://datadoghq.atlassian.net/browse/DSCVR-530
Review checklist (to be filled by reviewers)
qa/requiredif this PR needs QA validation, orqa/skip-qaif it does not. Exactly one of the two is required.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged