Add container-based config discovery support for gitlab_runner - #24608
Add container-based config discovery support for gitlab_runner#24608martavicentenavarro wants to merge 1 commit into
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd53213404
ℹ️ 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".
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 99e0bec | Docs | Datadog PR Page | Give us feedback! |
|
Codex Review: Didn't find any major issues. Delightful! 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". |
Adds container-based config discovery support to gitlab_runner using a manual from_ports strategy targeting the default metrics port (9252). Relaxes gitlab_url, prometheus_url, and allowed_metrics from required to optional in the spec so discovery-generated candidates pass validation, and defaults allowed_metrics to an empty list instead of raising when it's absent from init_config. Also clarifies the allowed_metrics spec example, regenerates conf.yaml.example, and documents discovery prerequisites and the gitlab_runner.can_connect gap in the README. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
8335eef to
99e0bec
Compare
Validation ReportAll 21 validations passed. Show details
|
What does this PR do?
Adds container-based config discovery support to
gitlab_runner, using a manualfrom_portsstrategy targeting the default metrics port (9252).gitlab_url,prometheus_url, andallowed_metricsare now optional in the spec, since discovery can't derive them from a container.allowed_metricsdefaults to[]instead of raising when omitted, so discovery-generated instances don't crash at runtime (covered by a new regression test).allowed_metricsspec example, regeneratedconf.yaml.example, and documented discovery prerequisites in the README.Known gap: discovery can't derive
gitlab_url, so thegitlab_runner.can_connectservice check is never emitted for auto-discovered instances.test_e2e_discoveryonly asserts the Prometheus service check for this reason.Motivation
https://datadoghq.atlassian.net/browse/DSCVR-521
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