Module k8s_gateway

Module k8s_gateway 

Source
Expand description

Kubernetes Gateway API translator (DW-064).

Translates Gateway API v1 resources (Gateway, HTTPRoute, GatewayClass) into dwara’s config model. This is the core translation layer; the kube-rs controller wiring (watching the API server via informers) lives in controller and the Ingress translator in ingress.

§Gateway API v1

The Gateway API v1 standard channel (v1.5) includes:

  • GatewayClass: the kind of Gateway (dwara is a controller).
  • Gateway: a listener configuration (ports, TLS, hostname).
  • HTTPRoute: HTTP routing rules (matches, filters, backends).

§Translation

The translator maps:

  • Gateway -> Listener (one per Gateway listener).
  • HTTPRoute -> Route (one per HTTPRoute rule match; a rule with multiple matches expands to one dwara route per match, since dwara routes carry a single match).
  • HTTPRoute backendRefs -> Service + Upstream + Endpoint.
  • HTTPRoute filters -> dwara route actions/transforms:
    • RequestRedirect -> RouteAction::Redirect.
    • RequestHeaderModifier -> Transforms.request.headers.
    • ResponseHeaderModifier -> Transforms.response.headers.
    • URLRewrite -> RouteAction::Proxy.rewrite (hostname/path).
    • Unsupported filters -> a warning (never silently dropped).

§Feature gate

None: the module compiles into every build (no k8s cargo feature).

Modules§

controller
Kubernetes Gateway API controller (DW-064).
ingress
Kubernetes Ingress / IngressClass translator (DW-064).

Structs§

FrontendValidation
Frontend TLS validation (for Reencrypt mode).
Gateway
A Gateway resource.
GatewayClass
A GatewayClass resource.
GatewayClassSpec
GatewayClass spec.
GatewayListener
A Gateway listener.
GatewaySpec
Gateway spec.
HttpBackendRef
An HTTP backend reference.
HttpHeaderFilter
A header name/value pair for header modifier filters.
HttpHeaderMatch
An HTTP header match.
HttpPathMatch
An HTTP path match.
HttpQueryParamMatch
An HTTP query parameter match.
HttpRoute
An HTTPRoute resource.
HttpRouteMatch
An HTTPRoute match.
HttpRouteRule
An HTTPRoute rule.
HttpRouteSpec
HTTPRoute spec.
ListenerTlsConfig
Listener TLS configuration.
ObjectMeta
Kubernetes object metadata (subset).
ParentReference
A parent reference (which Gateway this route attaches to).
SecretObjectReference
A reference to a Kubernetes Secret.
TranslationResult
The translation result: a dwara Gateway config.

Enums§

HttpRouteFilter
An HTTPRoute filter (standard-channel subset).
UrlRewritePath
The path rewrite type for URLRewrite filters.

Constants§

CONTROLLER_NAME
The dwara controller name for GatewayClass filtering.

Functions§

endpoint_key
Build the endpoint key for a K8s Service + port.
skipped_features
The list of standard-channel features the translator does NOT yet support (reported as skipped in the conformance report).
supported_features
The list of standard-channel conformance features the translator supports. Used by the conformance report generator.
translate
Translate Gateway API resources into a dwara Gateway config.