Available on crate feature
gateway-api only.Expand description
The Service rws keeps for each Gateway: the Gateway’s own address
(LoadBalancer by default), one port per listener port, each mapped to a
container port allocated from a range — the pods tell Gateways apart by
the port a connection arrives on, and never bind ports below 1024.
Allocations live in the Services themselves: a listener port keeps its container port for as long as its Service has it, so every replica, and every restart, agrees on the mapping without any other storage.
Structs§
- Service
Settings - How Gateways’ Services are made.
Constants§
- ENDPOINTS_
MANAGED_ BY endpointslice.kubernetes.io/managed-byon the EndpointSlices rws writes (not the EndpointSlice controller’s value, so it leaves them alone; a label value, so no/).
Functions§
- address_
supported - Address types rws can ask a load balancer for:
IPAddress(the default). - container_
ports - (listener port, transport) → container port, as the Gateway’s current Service maps it.
- current
- The Service rws manages for this Gateway, as it is now.
- desired
- The Service every one of
gatewaysshould have, allocating container ports for new listener ports (keeping every existing allocation). - endpoint_
slices - The EndpointSlice of each Gateway Service: the serving pods on the Service’s container ports (one slice per address family in use).
- requested_
addresses - The static addresses a Gateway asks for (
spec.addresseswith a value; one with only a type asks for any address). - same
- Whether
currentalready is whatdesiredasks for (the fields rws sets; the API server fills in others, likeclusterIPand node ports). - same_
slice - Whether an EndpointSlice already has what
desiredasks for. - service_
name - The Service’s name for a Gateway:
rws-<gateway>, shortened with a hash past the 63 characters a Service name may have. - serving_
pods - The serving pods: in the pod namespace, matching
selector, with an IP, not being deleted; (IP, ready, node, name). - transport
- The transport a listener protocol needs.