Skip to content

Add the Edge public listener API #1508

Description

@privateip

Summary

Providers need a way to ask for a public listener, and the platform needs a way to declare which addresses and ports each provider receives.

The design adds a new capability, a listener object that only the platform writes, and a way for a gateway service to take its backends from a listener.

Acceptance criteria

  • An operator can declare a provider's public addresses and ports, and an invalid declaration is refused with a reason.
  • A provider cannot create or change its own listener or gateway service.
  • Existing providers and gateway services behave as before.

Dependencies

Blocked by #1506.

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

    • PublicListener added to the capability enums on EdgeProvider.spec.capabilities[].name and EdgeService.spec.capabilities, with EdgeService MaxItems raised from 3 to 4. EdgeAttachment.spec.capabilities stays unchanged.
    • PublicListener in core's supportedCapabilities.
    • EdgeListener (galactic.datumapis.com/v1alpha1): immutable providerRef, serviceRef (an EdgeService in the ingress gVPC's namespace), up to one address per family, up to 16 ports with protocol, port and backendPort, healthPort, sessionAffinity, failurePolicy, and status with Accepted, Programmed and per-backend entries.
    • healthPort defaults to the first TCP backendPort. Validation refuses a listener whose ports are all UDP unless it sets healthPort.
    • NetworkService.spec.edgeListenerRef, refused in project namespaces. Today backendSelector is required with a non-empty rule. The change makes exactly one of backendSelector and edgeListenerRef required and keeps the non-empty rule when backendSelector is set.
    • RBAC: the platform authority may write EdgeListener.spec. Providers may not write EdgeListener or NetworkService.

    Work items

    • Types, CEL validation, generated CRDs and API reference.
    • Admission policy and RBAC changes.
    • Update the provider contract with the new capability and ownership rows.
  4. privateip commented on Nov 28, 2026

    @privateip
    ContributorAuthor

    Verdict: valid. On main at e7885de, no source, manifest or doc mentions EdgeListener, PublicListener or edgeListenerRef. This is checked against the source; there is no runtime reproduction, because the API does not exist yet.

    Two findings beyond the issue text:

    • Today an empty backendSelector fails the service at runtime (internal/controller/rulebackends.go, ruleBackendSelector). Once backendSelector becomes optional, a service with edgeListenerRef would hit that error. Until the gateway resolves listener backends, it needs a defined result: no backends, reported as pending.
    • network-services-operator builds NetworkService with a value LabelSelector. Changing backendSelector to a pointer would break that repo at its next galactic bump, so the field keeps its type and gains omitzero.

    The design is still under review in #1513, and work starts now on the decisions already settled there.

  5. privateip commented on Nov 28, 2026

    @privateip
    ContributorAuthor

    Approved plan.

    API

    1. Add PublicListener to the capability enums on EdgeProvider and EdgeService, and raise the EdgeService limit from 3 to 4. EdgeAttachment is unchanged. Core's supportedCapabilities gains PublicListener v1.
    2. Add EdgeListener with these fields:
      • immutable providerRef and serviceRef
      • at most one address per family
      • 1 to 16 ports, each with protocol (tcp or udp), port and backendPort
      • healthPort, which defaults to the first TCP backendPort and is required when every port is UDP
      • sessionAffinity, defaulting to ClientIPAndProtocol, and failurePolicy
      • status with Accepted, Programmed and a list of backends
    3. Add NetworkService.spec.edgeListenerRef. Exactly one of backendSelector and edgeListenerRef is required, and a backendSelector that is set must not be empty. backendSelector keeps its value type, with omitzero.

    Gateway

    A service with edgeListenerRef gets no backends and is reported as pending, so its VIPs are not advertised until listener backend resolution lands.

    Admission and RBAC

    • An unbound ClusterRole that an operator binds to the platform authority to write edgelisteners.
    • A policy, checked against every EdgeProvider, that refuses writes to edgelisteners and networkservices, and their status, by any provider's ServiceAccount.
    • A policy that refuses edgeListenerRef outside the gateway namespace. CRD validation cannot read the namespace.

    Docs

    The provider contract gains the capability and its writer rows. The CRDs, deepcopy code and API references are regenerated.

    Tests

    • CRD validation cases for the enums, addresses per family, the all-UDP healthPort rule, immutability and the exactly-one rule.
    • A unit test that a listener service yields no backends and no error.

    Risk

    The change only adds fields and enum values, so existing objects and network-services-operator are unaffected. Nothing serves an EdgeListener until #1509.

  6. added 2 commits that reference this issue on Nov 28, 2026
    6725484
    d907bb8
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