Skip to content

Build Edge public listener core controllers #1509

Description

@privateip

Summary

Once the API exists, each cell's controller has to turn a listener into something the gateways serve.

It creates a private ingress network for each provider, checks each listener, advertises every provider instance's address, and writes the gateway service. Deleting a listener has to withdraw the public addresses before anything else goes.

Acceptance criteria

  • A valid listener becomes a gateway service that lists every ready provider instance.
  • A listener with an unapproved provider, a missing grant or a bad address reports why it was refused.
  • Deleting a listener withdraws its public addresses before the gateway service is removed.

Dependencies

Blocked by #1508.

Activity

  1. self-assigned this
    on Nov 28, 2026
  2. added theissue type on Nov 28, 2026
  3. privateip commented on Nov 28, 2026

    @privateip
    ContributorAuthor

    Implementation detail from the design. Updated after #1506 settled the design's decisions and a review corrected its mapping onto the gateway API.

    Deliverable

    • One ingress gVPC per provider type holding PublicListener, named edge-ingress-<provider>, in the gateway namespace, addressed from an operator-configured platform ULA prefix, never exported to tenants and without egress policy.
    • EdgeListener admission: provider approved and listing PublicListener, service granting SocketAccess and PublicListener on the provider's ingress gVPC, addresses inside one of this cell's gateway VIP prefixes, address and port unclaimed. Status reasons ProviderNotApproved, CapabilityNotGranted, AddressOutsidePool, AddressClaimed, BackendsReady, NoBackends and LocalBackendsExcluded.
    • A BGPAdvertisement for each programmed listener attachment's /128 in the ingress VRF, with VRFID and End.DT46, withdrawn when the attachment leaves.
    • One gateway-namespace NetworkService per listener port, because a NetworkService serves one protocol and port. Each has vpcRef set to the ingress gVPC identifier, edgeListenerRef set, the port's protocol, port and backendPort, and spec.healthCheck carrying the listener's failurePolicy with a TCP probe on healthPort.
    • Deleting an EdgeListener withdraws the VIPs through the gateway drain path before its NetworkServices are removed.

    Listener addresses belong to one cell. Core cannot see other cells, so cell uniqueness comes from disjoint per-cell VIP prefixes, which AddressOutsidePool already enforces locally.

    Work items

    • Ingress gVPC controller.
    • Listener admission and status.
    • /128 publication and withdrawal.
    • NetworkService writer, one per port, with health checks and deletion ordering, and envtest coverage of every status reason.
  4. privateip commented on Nov 28, 2026

    @privateip
    ContributorAuthor

    Verdict: valid, blocked by #1508.

    I checked main at 2f364f0 by reading the source. Nothing on main serves an EdgeListener yet. The only mention of EdgeListener, PublicListener or edgeListenerRef there is the design in docs/designs/edge-public-listener.md. Each deliverable in the comment above, from the ingress gVPC controller to the NetworkService writer, is still to be built.

    These controllers need the API types from #1508, which are in #1514. That PR is open, with auto-merge enabled and a review pending. Implementation will branch from main once #1514 merges, or stack on #1514 if work starts sooner.

    I ran no reproduction: this is new controller work, so I checked the gap against the source instead. A fix plan follows once it is approved.

  5. privateip commented on Nov 28, 2026

    @privateip
    ContributorAuthor

    Approved plan. #1514 has merged, so this branches from main at 2a0dd12.

    Gaps found against the design

    • Nothing in Galactic allocates a VPC identifier. Only --role=fabric claims one, from IPAM, for a hub Network, so a cell cannot get one for the ingress gVPC alone.
    • The router advertises a BGPAdvertisement labelled as an Edge route only while that node's forwarding gate is open (internal/reconcile/reconcile.go), and galactic-edge opens gates only for accepted EdgeRoutes. A listener attachment's /128 cannot reuse that label.
    • The cell controller has no gateway VIP prefixes to test AddressOutsidePool against, and no ULA prefix for the ingress gVPC.

    Decisions

    Fix, in four PRs, one per work item:

    1. Ingress gVPC controller. New flags give the ULA prefix and the per-provider identities. Core carves a /64 per provider and creates the VPC. Adds RBAC for vpcs writes.
    2. Listener admission and status. A new flag gives the cell's gateway VIP prefixes. Core reports ProviderNotApproved, CapabilityNotGranted, AddressOutsidePool, AddressClaimed, BackendsReady, NoBackends and LocalBackendsExcluded, and lists status.backends.
    3. /128 publication and withdrawal, with VRFID and End.DT46, in the shape of Edge route publication.
    4. One gateway-namespace NetworkService per port, with the listener's health check. On deletion, a finalizer on the EdgeListener removes the services and waits until the gateway has withdrawn the VIPs. Only then does it withdraw the /128s.

    Tests: envtest under the shipped RBAC covers every status reason, /128 publication and withdrawal, one service per port, and the deletion order.

    Risk: everything runs behind --edge, and adds flags and RBAC without changing the API. Nothing serves a listener until #1510 and #1511 land.

    Out of scope: the node agent does not remove an attachment whose lease has expired. That will be filed separately.

  6. privateip commented on Nov 28, 2026

    @privateip
    ContributorAuthor

    @scotwells could you review the plan for this issue and comment? It is in the approved plan above. Two decisions most need a second opinion: the prototype ingress gVPC uses an identity the operator reserves by hand, and each listener attachment's /128 is advertised without a node gate. Implementation has started on fix/issue-1509.

  7. 1 remaining item

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

Low

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions