Skip to content

test: migrate httproute-accepted e2e from infra#237

Draft
ecv wants to merge 1 commit into
mainfrom
test/migrate-httproute-accepted-from-infra
Draft

test: migrate httproute-accepted e2e from infra#237
ecv wants to merge 1 commit into
mainfrom
test/migrate-httproute-accepted-from-infra

Conversation

@ecv

@ecv ecv commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What

Migrates the httproute-accepted Chainsaw test out of the datum/infra live-env suite into NSO's local kind harness at test/e2e/httproute-accepted/.

The test provisions a Gateway and an HTTPRoute, then waits for the Gateway to reach Accepted (3m) and the HTTPRoute to reach Accepted (2m).

Why

Per datum-cloud/infra#3006, infra is consolidating its live-env Chainsaw suite into a single "construct" group and evacuating single-service API-contract tests to their owning repos, run against the local kind harness pre-merge. These gateway.networking.k8s.io contracts are owned by NSO, so they belong here. Related: datum-cloud/infra#3005.

Adaptations from the infra source

  • Removed the datumctl auth update-kubeconfig setup step and the clusters:/cluster: project blocks pointing at ./test-kubeconfig. Now targets spec.cluster: nso-standard, matching sibling tests.
  • Removed spec.skip: true (the live blockers in infra #2733 do not apply to the local operator; the source noted these were fixed in #2880).
  • Inlined the gateway.yaml and httproute.yaml fixtures rather than keeping them as separate file: fixtures. Inlining is required so they can reference the per-namespace managed ($gatewayClassName) binding, and it matches every sibling test's convention (none use fixture files).
  • The source referenced a static gatewayClassName: datum-external-global-proxy that does not exist in the local harness. Replaced with a managed GatewayClass created per-test (controllerName: gateway.networking.datumapis.com/external-global-proxy-controller), exactly as the gateway sibling test does.
  • Mirrored the gateway sibling's preamble so the Gateway can program and reach Accepted: cert-manager self-signed CA + ClusterIssuer, downstream EnvoyProxy + datum-downstream-gateway-e2e GatewayClass, the datum-downstream-gateway-hostnames namespace, and a Verified Domain (e2e.env.datum.net).
  • Gave the tenant listener a hostname (test.e2e.env.datum.net) — hostname-less tenant listeners are now rejected at admission (Gateway: hostname-less tenant listeners rejected with misleading 'must be unique' (default-listener injection collision) #219 fix / fix: clear error for hostname-less tenant listeners #220).
  • Added the EndpointSlice (e2e-test-endpoint) the HTTPRoute's backendRef points at; the source referenced it but never created it.
  • Kept the Gateway Accepted (3m) and HTTPRoute Accepted (2m) waits intact.

Status

WIP / draft. chainsaw lint passes. Not verified against a running kind harness.

Known-uncertain

  • Does the Gateway reach Accepted in the local harness with only this preamble? The infra source only ever asserted Accepted (never Programmed), and it was skipped in the live env. The gateway sibling test drives a much larger flow to get there; I mirrored its setup but did not run it, so the exact minimal preamble needed for Accepted (vs Programmed) is unverified.
  • Domain / hostname coupling. I set the listener hostname to test.e2e.env.datum.net under the verified e2e.env.datum.net Domain, following the sibling. If NSO requires the listener hostname to match a verified Domain for Accepted, this should hold; if not, the Domain step may be unnecessary. Unverified.
  • HTTPRoute Accepted condition location. The wait uses the top-level Accepted condition on the HTTPRoute (as the infra source did). NSO may surface acceptance under status.parents[].conditions instead; if the top-level condition isn't populated, the wait would need to target the per-parent condition.
  • concurrent: false set because this test shares cluster-scoped downstream config (EnvoyProxy, downstream GatewayClass) with the other gateway e2e tests, matching their convention.
  • Fixture handling: inlined rather than copied as gateway.yaml/httproute.yaml files (see Adaptations). If reviewers prefer standalone fixtures, the bindings would need to move to static values.

Migrate the Gateway/HTTPRoute Accepted API-contract test out of
datum/infra's live-env Chainsaw suite into NSO's local kind harness, per
datum-cloud/infra#3006. This test validates gateway.networking.k8s.io
contracts owned by NSO, so it belongs in this repo and runs against the
local operator pre-merge.

Key changes:
- Drop the datumctl auth update-kubeconfig setup step and the
  clusters/cluster: project blocks that targeted ./test-kubeconfig; the
  test now runs on spec.cluster: nso-standard like the sibling tests.
- Remove spec.skip: true; the live blockers in #2733 don't apply to the
  local operator.
- Inline the gateway.yaml and httproute.yaml fixtures so they can bind to
  the per-namespace managed GatewayClass, matching sibling conventions.
- Create a managed GatewayClass, the cert-manager CA/ClusterIssuer, the
  downstream EnvoyProxy/GatewayClass and the verified Domain preamble the
  gateway sibling test uses, so the Gateway can program and reach Accepted.
- Give the tenant listener a hostname (required after #219/#220) and add
  the EndpointSlice backend the HTTPRoute references.
- Keep the Gateway Accepted (3m) and HTTPRoute Accepted (2m) waits intact.
@ecv

ecv commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Action required before this leaves draft

Two things to verify against a running nso-standard/nso-infra kind setup:

  1. Is the preamble sufficient for Accepted? This test mirrors the gateway sibling's
    cert-manager CA + downstream EnvoyProxy/GatewayClass + Domain preamble, gives the listener
    a hostname (required post-Gateway: hostname-less tenant listeners rejected with misleading 'must be unique' (default-listener injection collision) #219/fix: clear error for hostname-less tenant listeners #220), and seeds a backend EndpointSlice. Confirm the
    Gateway actually programs and reaches Accepted locally.
  2. HTTPRoute condition shape. Confirm the HTTPRoute exposes a top-level Accepted
    condition vs only status.parents[].conditions[] — the wait may need to target the
    parent-scoped condition instead.

Not run end-to-end yet (only chainsaw lint). Tracks datum-cloud/infra#3006.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant