Skip to main content

Module translate

Module translate 

Source
Available on crate feature gateway-api only.
Expand description

The pure step of the controller: a Snapshot of the cluster in, the configuration rws serves (GatewayConfig) and the status every object should have (Desired) out. No I/O, so the Gateway API’s acceptance rules — which routes attach to which listeners, which references resolve, which conditions and reasons are reported — are unit-tested here.

Structs§

ClientCa
The CAs a TLS-terminating listener verifies client certificates with.
Desired
The status each object should have; written only where it differs.
GatewayConfig
What the data plane serves.
ListenerConfig
One accepted listener, the container port it’s served on, and the routes attached to it. Only listeners whose Gateway’s Service already maps their port are served, so every replica agrees on the port.
Settings
What translation needs besides the cluster.
Snapshot
Everything the controller watches, as last seen.

Constants§

GATEWAY_NAME_LABEL
The label rws puts on the Service it creates for a Gateway (the name the Gateway API recommends), next to MANAGED_BY.
MANAGED_BY
app.kubernetes.io/managed-by on everything the controller creates.
SUPPORTED_FEATURES
The features rws reports on its GatewayClasses (names as in the suite’s pkg/features at Gateway API v1.6.3; sorted). Grows with each phase; FEATURES in .github/workflows/gateway-api.yml must match.

Functions§

gateway_addresses
A Gateway’s addresses: its Service’s load-balancer ingress.
translate