Skip to content

e2e(gateway): switching a live Gateway to another class has no test #4069

Open

Description

Problem / motivation
#3861 lets a tenant pick a Gateway class and follows it for TLS termination. Unit tests cover the selection in four charts and both controllers. No layer covers the transition: reprogramming a live Gateway onto another class. Gateway.spec.gatewayClassName has no immutability rule in the shipped CRD, so the apiserver accepts the update, and what the outgoing class controller does with the LoadBalancer Service it provisioned is invisible to a static review.

Proposed solution
Two cases of different cost. The certMode transition (http01 to edge and back, class stays cilium) fits the existing gateway chainsaw suite: create the probe TenantGateway with a passthrough service, attach a TLSRoute, assert Accepted=True, patch certMode, assert the TLS listener is gone and the route reports Accepted=False. The class transition needs a second GatewayClass with a live controller; the Cloudflare Tunnel controller needs credentials and cannot be a CI dependency, so this needs a stub controller that accepts a class and never programs, as a test-only component.

Scope check

  • This affects a single component / package
  • I can describe the expected behavior concretely

Alternatives considered
A manual check on a cluster with a real tunnel class. Fine once, not as a regression test.

Additional context
Surfaced while reviewing #3861.

Activity

  1. added
    kind/featureCategorizes issue or PR as related to a new feature
    area/testingIssues or PRs related to testing (e2e, bats, unit tests)
    on Sep 3, 2026
  2. added
    area/networkingIssues or PRs related to networking (ingress, gateway, vpn, metallb, kube-ovn)
    triage/acceptedIndicates an issue is ready to be actively worked on
    priority/backlogGeneral backlog priority. Lower than priority/important-longterm
    and removed
    triage/needs-triageIndicates an issue needs triage by a maintainer
    on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/networkingIssues or PRs related to networking (ingress, gateway, vpn, metallb, kube-ovn)area/testingIssues or PRs related to testing (e2e, bats, unit tests)kind/featureCategorizes issue or PR as related to a new featurepriority/backlogGeneral backlog priority. Lower than priority/important-longtermtriage/acceptedIndicates an issue is ready to be actively worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions