Skip to content

Make listener port optionalย #1061

@markmc

Description

@markmc

There are multiple cases where it may make sense to not require a gateway owner to specify a listener port:

  1. Where a port number is irrelevant or nonsensical - Use Case: Use Kubernetes to deploy a network operation as a Service leveraging the Gateway APIย #1052 is an example AIUI
  2. Where the port is well-known and can be derived from the listener protocol - e.g. where protocol==HTTP default to port 80 if unspecified
  3. Where a port should be auto-allocated for this listener - e.g. similar to auto-allocating an ephemeral port if you call bind() with the port specified as 0

One proposal is to specify that an unspecified port should be defined to have per-protocol semantics - so e.g. we'd define defaults for HTTP and HTTPS, but TLS, TCP, and UDP would be auto-allocated a random port. Implementation-specific protocols would define their own default behaviors.

Another alternative would be to use port==0 for auto-allocating a random port, and only have defaults for protocols where one makes sense.

See also #1060, #818, and Gateway API: Multi Port Approach

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions