Skip to content

Run cert-manager E2E with the Kubernetes Agent backend - #24896

Draft
nubtron wants to merge 1 commit into
masterfrom
nubtron/cert-manager-kubernetes-agent-e2e
Draft

Run cert-manager E2E with the Kubernetes Agent backend#24896
nubtron wants to merge 1 commit into
masterfrom
nubtron/cert-manager-kubernetes-agent-e2e

Conversation

@nubtron

@nubtron nubtron commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Runs the cert-manager Kind E2E with the Kubernetes Agent backend introduced by #24639.

  • The openmetrics_endpoint (port 9402) has no matching Service, so it falls back to the pod IP of the cert-manager deployment, fetched via kubectl get pods -n cert-manager --selector app.kubernetes.io/component=controller (falling back to --selector app=cert-manager if no pods match). The Agent now scrapes http://{controller_ip}:9402/metrics from inside the cluster instead of through a kubectl port-forward tunnel.
  • Removes the ExitStack/port_forward setup; the Agent runs in a pod inside the kind cluster (agent_type: kubernetes), eliminating the port-forward startup race.

Motivation

Reduces Kind E2E flakes caused by the Agent running outside the cluster with port forwarding, which introduces startup races (e.g. Connection refused to the forwarded endpoint). Running the Agent inside the cluster removes the port-forward dependency. See the cert-manager master flake on 2026-08-12 (test_check_okConnection refused to http://10.1.0.253:36415/metrics), which is exactly the class this conversion eliminates.

Follows the same pattern already applied to argo_workflows (#24827), fluxcd (#24829), and weaviate (#24830), plus the pod-IP fallback pattern from velero (#24645) for the port with no Service.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Pipelines

⚠️ Warnings

🚦 4 Pipeline jobs failed

PR | test / test (linux, ubuntu-22.04, cert_manager, cert-manager (py3.13), py3.13) / cert-manager (py3.13)-py3.13 — 🔧 Needs a code fix, caused by this PR

View in Datadog · View in GitHub Actions

Linting failed due to import block being un-sorted or un-formatted in tests/conftest.py:4:1.

PR | test / test-minimum-base-package (linux, ubuntu-22.04, cert_manager, cert-manager (py3.13), py3.13) / minimum-base-package-cert-manager (py3.13)-py3.13 — 🔧 Needs a code fix, caused by this PR

View in Datadog · View in GitHub Actions

Linting failed due to unsorted import block in tests/conftest.py:4:1. Please run 'ddev test --fmt cert_manager' to fix formatting issues.

PR | test / check

View in Datadog · View in GitHub Actions

Job did not run: blocked by a failed job in an earlier pipeline stage.

View all 4 failed jobs.

📋 Copy prompt for your agent
CI on my pull request is failing. Help me find and fix the root cause of each failing job below — they were flagged as caused by changes in this PR, so focus on the diff. For each job, explain the failure and propose a fix.

Branch: nubtron/cert-manager-kubernetes-agent-e2e

PR | test / test (linux, ubuntu-22.04, cert_manager, cert-manager (py3.13), py3.13) / cert-manager (py3.13)-py3.13
Commit: da26c1e21729ef6a030ff7b95c3097741d5eaafa
Error (code / quality):
Linting failed due to import block being un-sorted or un-formatted in tests/conftest.py:4:1.
CI job: https://github.com/DataDog/integrations-core/actions/runs/32128640155/job/95684789024

PR | test / test-minimum-base-package (linux, ubuntu-22.04, cert_manager, cert-manager (py3.13), py3.13) / minimum-base-package-cert-manager (py3.13)-py3.13
Commit: da26c1e21729ef6a030ff7b95c3097741d5eaafa
Error (code / quality):
Linting failed due to unsorted import block in tests/conftest.py:4:1. Please run 'ddev test --fmt cert_manager' to fix formatting issues.
CI job: https://github.com/DataDog/integrations-core/actions/runs/32128640155/job/95684789103

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: da26c1e | Docs | View more details | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Validation Report

Validation Description Status
qa-label Validate the pull request declares whether it needs QA for the next Agent release

Run ddev validate all changed --fix to attempt to auto-fix supported validations.

Passed validations (20)
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant