[CONTP-1598] Add GKE Autopilot e2e test#3158
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3158 +/- ##
=======================================
Coverage 44.03% 44.03%
=======================================
Files 377 377
Lines 30713 30713
=======================================
Hits 13525 13525
Misses 16300 16300
Partials 888 888
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
88326dd to
5563b55
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9c702631d
ℹ️ 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".
| extends: .e2e_gcp_base | ||
| stage: e2e | ||
| needs: | ||
| - "trigger_e2e_operator_image" |
There was a problem hiding this comment.
Make the GKE image need optional when trigger is skipped
On README-only branches, trigger_e2e_operator_image is excluded by .on_run_e2e_base's *.md when: never rule, but this new manual job is still added because its rules fall through to when: manual. Since the need on trigger_e2e_operator_image is mandatory, those pipelines reference a job that is not present; mirror the trigger's skip rules here or mark this need optional.
Useful? React with 👍 / 👎.
| return image | ||
| } | ||
|
|
||
| return images.FromString(image).WithRegistry(images.GCRContainerRegistry).ToString() |
There was a problem hiding this comment.
Preserve digest-pinned image references
When Autopilot users pin a node-agent image as name:tag@sha256:<digest> via the normal overrides, this unconditional registry rewrite passes that reference through images.FromString, whose colon split treats only tag@sha256 as the tag and drops the digest value. The resulting image becomes something like gcr.io/datadoghq/agent:7.80.2@sha256, so the DaemonSet cannot pull the pinned image; skip digest references here or parse them with a container-reference parser before changing only the registry.
Useful? React with 👍 / 👎.
What does this PR do?
Adds a manually triggered GKE Autopilot E2E test path for the Datadog Operator.
The change introduces:
datadog-agente2e framework GCP/GKE resourcesexperimental.agent.datadoghq.com/autopilot: "true", log collection withcontainerCollectAll, and NPM enabledTestGKEAutopilotSuitevalidating the operator, node agent, cluster agent, system-probe container presence, and fakeintake ingestion for Kubernetes metrics, logs, and NPM connection payloadsmake e2e-gke-autopilot-teststargetMotivation
We already exercise the operator on kind, but GKE Autopilot has provider-specific constraints around privileged workloads, host paths, image allowlists, and pod connectivity. This adds a CI entry point for validating the operator's Autopilot path against real GKE Autopilot infrastructure before wiring it into release branch/tag automation.
Additional Notes
This job is manual-only for now. Release branch/tag automation can be added once the job is stable.
The CI setup follows the existing
datadog-agentandhelm-chartse2e patterns:Minimum Agent Versions
No minimum runtime Agent or Cluster Agent version change. This is test/CI coverage only.
Describe your test plan
Manual CI validation:
Local validation:
go test ./internal/controller/datadogagent/experimental -count=1go test ./internal/controller/datadogagent -run Test_AutopilotOverrides -count=1cd test/e2e && GOWORK=off go test ./tests/k8s_suite -run '^$' -count=1 --tags=e2emake lint-e2eChecklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel