Skip to main content

GATEWAY_API_KEY_TIMEOUTS

Constant GATEWAY_API_KEY_TIMEOUTS 

Source
pub const GATEWAY_API_KEY_TIMEOUTS: &str = "timeouts";
Expand description

Canonical K8s Gateway API HTTPRoute per-rule request-timeout-policy body-axis key every gateway_routes-emitted HTTPRoute document mounts its per-rule :politicas :timeout overlay under (spec.rules[].timeouts). Sibling per-rule-body-axis peer to GATEWAY_API_KEY_BACKEND_REFS (a6c5679) and GATEWAY_API_KEY_HOSTNAMES (b77f744) — same Gateway-API-CRD-body-axis discipline nested one level deeper onto the per-rule request-deadline slot the Gateway API v1 CRD schema pins under HTTPRoute.spec.rules[].

The Gateway API v1 CRD schema pins the per-rule request-timeout policy through the HTTPRouteTimeouts sub-shape mounted at spec.rules[].timeouts, whose request / backendRequest scalars carry the per-rule deadline the Gateway-API-implementation-side per- rule request-dispatch loop compares each accepted request’s wall-clock elapsed time against before cancelling the in-flight backend call. Drift on the per-rule timeout-policy body-axis is exactly as load-bearing as drift on the sibling per-rule backend- destination axis (backendRefs): the K8s apiserver-side Gateway API CRD schema validator drops any per-rule entry whose per-rule timeout-policy axis carries an unrecognized key — a "timeout" (singular) / "timeoutPolicy" / "deadlines" typo silently emits an HTTPRoute whose per-rule timeout-policy the Gateway API implementation’s per-rule request-dispatch loop no-ops entirely: the route accepts every inbound request with no per-rule wall-clock deadline (the “no infinite blocking” guarantee MESH-COMPOSITION.md §V mandates for every rendered per-:politicas mesh-composition edge silently regresses to the pre-overlay unbounded-request semantic, and every external :entrada flow the route was authored to bound by the typed :politicas :timeout slot runs to whatever backend deadline the resolved ComputeUnit / Service / ExternalName backend’s downstream infrastructure (Envoy default listener idle timeout, node-local conntrack window, TCP keepalive) picks — with no field naming the per-rule-timeout- policy-axis-drift root cause).

The single source of truth the rendered Aplicacao Gateway-API-side ingress bundle’s per-HTTPRoute per-rule request-timeout-policy- axis-naming reaches for:

  • the rendered HTTPRoute document’s per-rule timeouts: axis (caixa-mesh/src/lib.rs — the gateway_routes per-Aplicacao HTTPRoute’s per-rule rule.insert("timeouts", …) call seeded from the Aplicacao’s :politicas :timeout overlay when the slot is set, elided from the emit sequence when the slot is unset).

The per-rule request-timeout-policy axis names the same Gateway- API-implementation-side per-rule request-dispatch deadline container as the sibling GATEWAY_API_KEY_BACKEND_REFS per-rule backend-destination container axis it sits beside under spec.rules[].*, and must move together on any future Gateway API rebrand (an upstream SIG-Network Gateway API v2 rename of the per- rule timeout-policy axis from timeouts to timeout / timeoutPolicy / deadlines, coordinated with the Gateway API deprecation cycle). Until this lift landed the axis carried an inline timeouts literal at nine physical sites in caixa-mesh/src/lib.rs (one production emitter at the gateway_routes per-rule rule.insert(…) call plus eight test- side navigators pinning the overlay’s presence, absence, canonical-duration-format contract, per-rule fan-out under multi-:entrada :paths, and independent-axis coexistence with the sibling retry per-rule retry-policy axis), the highest per-axis occurrence count of any un-lifted Gateway-API-CRD-body-axis in the crate.

The PRIME DIRECTIVE duplication-budget rule (THEORY.md §I.3.5, “every recurring shape becomes a generator before it becomes a pattern; every pattern becomes a library before it becomes duplicated code. The duplication budget is zero.”) promotes the constant to a typed substrate-side &'static str on the same trajectory the GATEWAY_API_KEY_HOSTNAMES (b77f744) / GATEWAY_API_KEY_HOSTNAME (c96fa22) / GATEWAY_API_KEY_LISTENERS (29f2415) / GATEWAY_API_KEY_PARENT_REFS (f44e823) / GATEWAY_API_KEY_BACKEND_REFS (a6c5679) / CILIUM_KEY_PORTS (1087693) / CILIUM_KEY_FROM_ENDPOINTS (ecfa557) / CILIUM_KEY_INGRESS (0400a9b) / CILIUM_KEY_ENDPOINT_SELECTOR (7088789) / CILIUM_KEY_TO_PORTS (c8d9cbf) / KUBE_KEY_RULES (a205eb3) lifts established on the sibling canonical-Gateway-API-CRD-body-axis / canonical-Cilium-CNP-body-axis surfaces — extends the per-Gateway- API-HTTPRoute per-rule body-axis lift set onto the load-bearing per-rule request-timeout-policy axis every downstream Gateway-API- implementation-side per-rule request-dispatch loop keys off before it can commit to a per-request wall-clock deadline. The render- side consumer now threads the same &'static str through its per-rule rule.insert(…) call and every test-side navigator’s .get(…) retrieval so a future Gateway API rebrand on the per- rule timeout-policy axis (or an upstream SIG-Network Gateway API v2 rename to a per-CRD sibling name) lands in one place; every future renderer that reaches for the canonical per-rule timeout- policy axis (the future M4 mesh.pleme.io/v1alpha1/Aplicacao CR materializer’s per-Aplicacao per-rule timeout-policy fan-out, a future per-edge backendRequest sub-timeout emitter honoring the downstream :politicas :backend-timeout slot the M4 roadmap acknowledges, a future per-cluster per-rule idle-timeout emitter binding against this same axis) inherits the same value by construction with no opportunity for per-renderer drift.

Same “the typed constant lives in one place” discipline the GATEWAY_API_KEY_HOSTNAMES (b77f744) / GATEWAY_API_KEY_HOSTNAME (c96fa22) / GATEWAY_API_KEY_LISTENERS (29f2415) / GATEWAY_API_KEY_PARENT_REFS (f44e823) / GATEWAY_API_KEY_BACKEND_REFS (a6c5679) / CILIUM_KEY_PORTS (1087693) / CILIUM_KEY_FROM_ENDPOINTS (ecfa557) / CILIUM_KEY_INGRESS (0400a9b) / CILIUM_KEY_ENDPOINT_SELECTOR (7088789) / CILIUM_KEY_TO_PORTS (c8d9cbf) / KUBE_KEY_RULES (a205eb3) lifts apply on the peer canonical- Gateway-API-HTTPRoute-per-rule-body-axis surface.