Skip to content

Run Calico E2E with the Kubernetes Agent backend - #24673

Draft
nubtron wants to merge 57 commits into
masterfrom
nubtron/calico-kubernetes-agent-e2e
Draft

Run Calico E2E with the Kubernetes Agent backend#24673
nubtron wants to merge 57 commits into
masterfrom
nubtron/calico-kubernetes-agent-e2e

Conversation

@nubtron

@nubtron nubtron commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Run the Calico Kind E2E with the Kubernetes Agent backend and configure the check with the in-cluster Felix metrics Service endpoint.

The endpoint readiness check now runs from a temporary BusyBox pod because Kubernetes Service DNS is not resolvable from the host. It retains the existing 100 attempts with a two-second wait while avoiding a persistent port-forward used only for Agent transport.

Motivation

This migration exercises Calico through the Kubernetes Agent interface introduced by #24639 while preserving the custom Kind networking configuration, Calico CNI setup, Felix metrics patch, startup sleep, instance options, and existing tests.

Validation:

  • cd ddev && hatch run -- ddev --no-interactive test -fs calico
  • cd ddev && hatch run -- ddev --no-interactive test --lint calico
  • cd ddev && hatch run -- ddev --no-interactive test calico
  • cd ddev && hatch run ddev env start --dev calico py3.13
  • cd ddev && hatch run ddev env test --dev calico py3.13 (1 passed)
  • cd ddev && hatch run ddev env stop calico py3.13

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

@nubtron nubtron added the qa/skip-qa Automatically skip this PR for the next QA label Jul 23, 2026
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 23, 2026

Copy link
Copy Markdown

Tests  Code Coverage

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 30.00%
Overall Coverage: 80.00% (-8.41%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f35fe99 | Docs | Datadog PR Page | Give us feedback!

@nubtron
nubtron force-pushed the nubtron/calico-kubernetes-agent-e2e branch 4 times, most recently from 7fddc4e to 6bc1e7c Compare July 30, 2026 13:31
nubtron added 23 commits August 10, 2026 09:27
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
nubtron force-pushed the nubtron/kubernetes-agent-interface-e2e branch from 2a64043 to f21cf4c Compare August 10, 2026 09:28
@nubtron
nubtron force-pushed the nubtron/calico-kubernetes-agent-e2e branch from 34d6c3b to f35fe99 Compare August 10, 2026 09:35
@dd-octo-sts

dd-octo-sts Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 21 validations passed.

Show details
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
qa-label Validate the pull request declares whether it needs QA for the next Agent release
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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration/calico qa/skip-qa Automatically skip this PR for the next QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant