Run Flux CD E2E with the Kubernetes Agent backend - #24829
Open
vitkyrka wants to merge 2 commits into
Open
Conversation
Convert fluxcd's dd_environment fixture from host-side port-forwarding to reaching the flux-system controllers from inside the Kind cluster. The flux-system Services only expose each controller's API port, not the Prometheus metrics port, so Service DNS cannot reach /metrics; instead the pod IP of all four single-replica controller Deployments is fetched once during cluster setup and cached via ddev's save_state/get_state, so later `ddev env` invocations (including `stop`) don't need to re-run kubectl against a cluster that may already be gone. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
evalya-impact-summaryevalya impact analysis |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: b8cbbc9 | Docs | Datadog PR Page | Give us feedback! |
Contributor
Author
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bcda1e9390
ℹ️ 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".
Addresses a Codex review finding on PR #24829. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Validation ReportAll 21 validations passed. Show details
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 Flux CD Kind E2E with the Kubernetes Agent backend introduced by #24639, following the pattern established for Argo Rollouts in #24674.
The
dd_environmentfixture no longer port-forwards from the host; instead it builds endpoints that are reachable from inside the Kind cluster:source-controllerandnotification-controllerdo have a KubernetesService, but that Service only forwards its port80to the controller's API port (9090), not to the Prometheus metrics port (8080) — confirmed by inspecting theEndpointsobject and by a manual in-clusterwgetagainst the Service DNS name, which times out on:8080. Service DNS therefore cannot be used to reach/metricsfor these two controllers.helm-controllerandkustomize-controllerhave no Service at all.Because none of the four controllers' metrics ports are reachable via a Service, all four use their pod's IP directly on port
8080(the port the shippedallow-scrapingNetworkPolicy explicitly opens to cross-namespace ingress, confirming it's the intended scrape path). Each controller is a single-replica Deployment, so the pod IP is unambiguous. The pod IP is looked up once insidesetup_fluxcd()— while the Kind cluster is guaranteed to still be up — and cached withdatadog_checks.dev._env.save_state/get_state(mirroringget_node_agent()in #24645 for Velero), soddev env testandddev env stop, which re-invokedd_environmentin a fresh process, don't need to re-runkubectlagainst a cluster that may already be gone.Validation:
ddev test -fs fluxcdddev --no-interactive test fluxcd(4 passed, 1 E2E skipped)ddev env show fluxcd(py3.13)ddev env start --dev fluxcd py3.13ddev env test --dev fluxcd py3.13(1 passed, 4 deselected)ddev env stop fluxcd py3.13Motivation
This PR migrates Flux CD to the new backend. Running the Agent inside the same Kind cluster removes the long-lived host-side
kubectl port-forwardprocesses without changing the E2E setup, waits, instance shape, assertions, or timeout behavior.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