Skip to content

gateway: the edge listener shares its allowedRoutes pointer with the apex and child listeners #4118

Open

Description

Describe the bug
renderGateway in internal/controller/tenantgateway/reconciler.go, case CertModeEdge: edgeAllowedRoutes := allowedRoutes.DeepCopy() is handed to the edge listener as is, while edge-apex and every edge-child-* listener receive edgeAllowedRoutes.DeepCopy(). Harmless today, since nothing mutates the value after the assignment, but it is the one place that does not follow the pattern the neighbouring branches use (passthroughAllowed := allowedRoutes.DeepCopy(), a constructor for port443Kinds) so that every listener owns its RouteNamespaces and its Kinds slice. The first edgeAllowedRoutes.Kinds = ... written after that line reaches the edge listener through the shared pointer and nothing else.

Environment

To Reproduce

  1. Read the CertModeEdge branch of renderGateway

Expected behaviour
All three edge listener kinds get their own copy.

Actual behaviour
One shares the pointer.

Additional context
One-word change: AllowedRoutes: edgeAllowedRoutes.DeepCopy() on the edge listener. Surfaced by a review pass over #3342 as a pre-existing item.

Checklist

  • I have checked the documentation
  • I have searched for similar issues
  • I have included all required information
  • I have provided clear steps to reproduce
  • I have included relevant logs

Activity

  1. added
    kind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debt
    area/networkingIssues or PRs related to networking (ingress, gateway, vpn, metallb, kube-ovn)
    on Sep 7, 2026
  2. added
    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
  3. added a commit that references this issue on Oct 8, 2026
    7cf56fb
  4. added a commit that references this issue on Oct 11, 2026
    f2ec6af
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)kind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debtpriority/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