Run Kyverno E2E with the Kubernetes Agent backend - #24672
Draft
nubtron wants to merge 57 commits into
Draft
Conversation
Contributor
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 37eb94a | Docs | Datadog PR Page | Give us feedback! |
3 tasks
nubtron
force-pushed
the
nubtron/kyverno-kubernetes-agent-e2e
branch
4 times, most recently
from
July 30, 2026 13:31
0b4ceca to
17dd895
Compare
Clarified the implementation details regarding Kubernetes node support.
Reading self.metadata['kubernetes'] unguarded turned a missing metadata block into a bare KeyError, so an environment that selects agent_type 'kubernetes' without the accompanying mapping failed with 'Unable to start the Agent: kubernetes' and gave a raw traceback from ddev env shell, which only handles CalledProcessError. Validate the mapping where it is read so the failure names the missing contract instead.
start() stamped PREPARED_MARKER after _restart_agent_process(), so a container replaced during the restart was marked prepared. The marker lives in the container filesystem and the pod declares no volumes, so a replacement loses the copied conf.yaml, auto_conf.yaml and the editable installs, while _wait_for_agent() still succeeds against the fresh container. Every later _require_prepared() check then passed and tests silently exercised the Agent-shipped integration with no configuration. Stamp the marker once preparation is complete and assert it after the restart, matching the invariant restart() already relies on. Checking after the stamp instead would only observe the gap between the two commands.
nubtron
force-pushed
the
nubtron/kubernetes-agent-interface-e2e
branch
from
August 10, 2026 09:28
2a64043 to
f21cf4c
Compare
nubtron
force-pushed
the
nubtron/kyverno-kubernetes-agent-e2e
branch
from
August 10, 2026 09:34
c922643 to
37eb94a
Compare
Contributor
Validation ReportAll 21 validations passed. Show details
|
Base automatically changed from
nubtron/kubernetes-agent-interface-e2e
to
master
August 10, 2026 17:43
An error occurred while trying to automatically change base from
nubtron/kubernetes-agent-interface-e2e
to
master
August 10, 2026 17:43
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 Kyverno Kind E2E Agent inside the test cluster through the Kubernetes Agent backend. The check now reaches the four Kyverno metrics services over in-cluster DNS instead of maintaining host port-forwards.
Validation:
cd ddev && hatch run -- ddev --no-interactive test -fs kyverno— passed.cd ddev && hatch run -- ddev --no-interactive test --lint kyverno— passed.cd ddev && hatch run -- ddev --no-interactive test kyverno— 6 passed, 1 E2E test skipped by the unit-test run.cd ddev && hatch run -- ddev env start --dev kyverno py3.13— started the dedicated Kind cluster and Kubernetes Agent.cd ddev && hatch run -- ddev env test --dev kyverno py3.13— 1 E2E test passed.cd ddev && hatch run -- ddev env stop kyverno py3.13— deleted the dedicated Kind cluster.Motivation
Builds on #24639 to exercise the Kubernetes Agent backend against Kyverno while preserving the existing E2E coverage and startup 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