You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Runs the Istio Kind E2E with the Kubernetes Agent backend introduced by #24639.
Both the sidecar and ambient modes are converted:
The ztunnel_endpoint (ambient, port 15020) uses the in-cluster Service DNS endpoint, http://ztunnel-metrics.istio-system.svc.cluster.local:15020/stats/prometheus, backed by the ztunnel-metrics Service applied via istio/tests/kind/ztunnel_service.yaml.
The waypoint_endpoint (ambient, port 15090) has no Service exposing its metrics port, so it falls back to the pod IP of the waypoint deployment, fetched via kubectl get pods -n default --selector app=waypoint.
The istiod_endpoint (both modes, port 15014) has no Service exposing port 15014 (the istio install exposes 15010/15012/15017, not the metrics port), so it falls back to the pod IP of the istiod deployment, fetched via kubectl get pods -n istio-system --selector app=istiod.
Pod IPs are resolved in the setup functions (after the readiness waits) and cached via save_state/get_state, since dd_environment re-runs in a fresh process after teardown.
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, or got 0 candidates timing flakes when metrics are not ready). Istio had the highest genuine recurring flake count among the unconverted kind targets (5 test-level fails in the last 30 days, 5 of them flagged known_flaky), plus a 404 endpoint flake — all consistent with the port-forward/timing signature this conversion removes.
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 ports 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
PR | test / test (linux, ubuntu-22.04, istio, Istio (py3.13-1.13-sidecar), py3.13-1.13-sidecar) / Istio (py3.13-1.13-sidecar)-py3.13-1.13-sidecar — 🔧 Needs a code fix, caused by this PR
2 failed tests. AssertionError: Needed at least 1 candidates for 'istio.prometheus.health', got 0 in test_e2e_openmetrics_v1 and 'istio.openmetrics.health', got 0 in test_e2e_openmetrics_v2.
PR | test / test (linux, ubuntu-22.04, istio, Istio (py3.13-1.24-sidecar), py3.13-1.24-sidecar) / Istio (py3.13-1.24-sidecar)-py3.13-1.24-sidecar — 🔧 Needs a code fix, caused by this PR
2 failed tests. AssertionError: Needed at least 1 candidates for 'istio.prometheus.health', got 0 and for 'istio.openmetrics.health', got 0.
PR | test / test (linux, ubuntu-22.04, istio, Istio (py3.13-1.29-sidecar), py3.13-1.29-sidecar) / Istio (py3.13-1.29-sidecar)-py3.13-1.29-sidecar — 🔧 Needs a code fix, caused by this PR
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/istio-kubernetes-agent-e2e
PR | test / test (linux, ubuntu-22.04, istio, Istio (py3.13-1.13-sidecar), py3.13-1.13-sidecar) / Istio (py3.13-1.13-sidecar)-py3.13-1.13-sidecar
Commit: 021610c6abf3ca1ccadffbd4ff620b02e806a588
Error (code / test):
2 failed tests. AssertionError: Needed at least 1 candidates for 'istio.prometheus.health', got 0 in test_e2e_openmetrics_v1 and 'istio.openmetrics.health', got 0 in test_e2e_openmetrics_v2.
CI job: https://github.com/DataDog/integrations-core/actions/runs/32128905342/job/95685584757
PR | test / test (linux, ubuntu-22.04, istio, Istio (py3.13-1.24-sidecar), py3.13-1.24-sidecar) / Istio (py3.13-1.24-sidecar)-py3.13-1.24-sidecar
Commit: 021610c6abf3ca1ccadffbd4ff620b02e806a588
Error (code / test):
2 failed tests. AssertionError: Needed at least 1 candidates for 'istio.prometheus.health', got 0 and for 'istio.openmetrics.health', got 0.
CI job: https://github.com/DataDog/integrations-core/actions/runs/32128905342/job/95685584664
PR | test / test (linux, ubuntu-22.04, istio, Istio (py3.13-1.29-sidecar), py3.13-1.29-sidecar) / Istio (py3.13-1.29-sidecar)-py3.13-1.29-sidecar
Commit: 021610c6abf3ca1ccadffbd4ff620b02e806a588
Error (code / test):
2 failed tests: Needed at least 1 candidates for 'istio.prometheus.health', got 0 and 'istio.openmetrics.health', got 0 in tests/test_e2e.py.
CI job: https://github.com/DataDog/integrations-core/actions/runs/32128905342/job/95685584686
Needed at least 1 candidates for 'istio.prometheus.health', got 0
Expected:
ServiceCheckStub(check_id=None, name='istio.prometheus.health', status=0, tags=None, hostname=None, message=None)
Difference to closest:
Similar submitted:
Score Most similar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Runs the Istio Kind E2E with the Kubernetes Agent backend introduced by #24639.
Both the
sidecarandambientmodes are converted:ztunnel_endpoint(ambient, port 15020) uses the in-cluster Service DNS endpoint,http://ztunnel-metrics.istio-system.svc.cluster.local:15020/stats/prometheus, backed by theztunnel-metricsService applied viaistio/tests/kind/ztunnel_service.yaml.waypoint_endpoint(ambient, port 15090) has no Service exposing its metrics port, so it falls back to the pod IP of thewaypointdeployment, fetched viakubectl get pods -n default --selector app=waypoint.istiod_endpoint(both modes, port 15014) has no Service exposing port 15014 (the istio install exposes 15010/15012/15017, not the metrics port), so it falls back to the pod IP of theistioddeployment, fetched viakubectl get pods -n istio-system --selector app=istiod.save_state/get_state, sincedd_environmentre-runs in a fresh process after teardown.ExitStack/port_forwardsetup; 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 refusedto the forwarded endpoint, orgot 0 candidatestiming flakes when metrics are not ready). Istio had the highest genuine recurring flake count among the unconverted kind targets (5 test-level fails in the last 30 days, 5 of them flaggedknown_flaky), plus a404endpoint flake — all consistent with the port-forward/timing signature this conversion removes.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 ports with no Service.
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