Skip to main content

GATEWAY_API_KIND_GATEWAY

Constant GATEWAY_API_KIND_GATEWAY 

Source
pub const GATEWAY_API_KIND_GATEWAY: &str = "Gateway";
Expand description

Canonical K8s Gateway API CRD kind discriminator the rendered Gateway document declares at its top-level KUBE_KEY_KIND axis. Pairs with the sibling GATEWAY_API_API_VERSION (3c6cfc3) — the K8s apiserver-side CRD resolution contract is the (apiVersion, kind) tuple keyed against the registered CustomResourceDefinition, so drift on the kind axis is exactly as load-bearing as drift on the apiVersion axis it accompanies (the apiserver’s RESTMapper consults both together; a ("gateway.networking.k8s.io/v1", "Gatway") typo at the production- code call site lands outside the registered Gateway-API-conformant Gateway CRD’s RESTKind lookup, surfacing apply-side as a non-self-locating “no kind ‘Gatway’ is registered for version ‘gateway.networking.k8s.io/v1’” error far from the source caixa.lisp / the renderer’s kube_resource_skeleton call site).

The single source of truth the rendered Aplicacao Gateway-API-side ingress bundle’s Gateway-naming axis reaches for:

  • the rendered Gateway document’s top-level KUBE_KEY_KIND axis (caixa-mesh/src/lib.rs:578 — the gateway_routes per- Aplicacao Gateway kube_resource_skeleton kind argument).

The kind axis names the same Gateway-API-conformant CRD discriminator as the sibling GATEWAY_API_API_VERSION apiVersion axis and must move together on any future Gateway-API rebrand. Until this lift landed the axis carried an inline Gateway literal at the one production-code occurrence in caixa-mesh/src/lib.rs:578 (the gateway_routes Gateway kube_resource_skeleton kind argument) plus a matching set inside the in-file gateway_carries_canonical_kube_skeleton_without_labels / render_all_includes_every_artifact_kind test fixtures plus the find() predicate of every per-Gateway-kind test that picks the Gateway document out of the rendered Aplicacao mesh bundle — five occurrences of the same load-bearing Gateway-API-CRD-kind- discriminator convention, drift-prone by construction. A drift on the top-level Gateway kind axis would have surfaced as a non-self-locating “no kind ‘Gatway’ is registered for version ‘gateway.networking.k8s.io/v1’” error far from the source caixa.lisp at apply parse time, with the rendered per-Aplicacao Gateway never landing in the apiserver-side CRD registration and every external :entrada flow dropping at the gateway-class-controller’s reconcile loop with no field naming the kind-discriminator-drift root cause.

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 CILIUM_KIND_NETWORK_POLICY (eac85cb) / FLUX_KIND_KUSTOMIZATION (4114773) / FLUX_KIND_HELM_RELEASE (e24ea3c) / FLUX_KIND_GIT_REPOSITORY (dbbcf29) / GATEWAY_API_API_VERSION (3c6cfc3) lifts established on the sibling cluster-side-CRD-kind-discriminator + canonical-CRD- group/version axes — extends the discipline from the apiVersion half of the (apiVersion, kind) CRD-lookup tuple onto the kind half on the same Gateway-API-CRD-axis, beginning the per-Gateway- API-CRD kind+apiVersion lift pair the M3 Aplicacao mesh renderer’s external :entrada ingress contract rests on. The render-side consumer now threads the same &'static str through its kube_resource_skeleton call so a future Gateway-API rebrand lands in one place; every future renderer that reaches for the canonical Gateway-API Gateway kind (the future M4 mesh.pleme.io/v1alpha1/Aplicacao CR materializer’s per-Aplicacao Gateway fan-out, a future per-cluster GatewayClass renderer the operator emits for per-cluster gateway-class scoping, a future per-edge TCPRoute / TLSRoute / GRPCRoute renderer for non-HTTP :entrada edges that pair against this same Gateway parent) inherits the same value by construction with no opportunity for per-renderer drift.

Same “the typed constant lives in one place” discipline the CILIUM_KIND_NETWORK_POLICY (eac85cb) / FLUX_KIND_KUSTOMIZATION (4114773) / FLUX_KIND_HELM_RELEASE (e24ea3c) / FLUX_KIND_GIT_REPOSITORY (dbbcf29) / GATEWAY_API_API_VERSION (3c6cfc3) / CILIUM_API_VERSION (279d611) lifts apply on the peer canonical-cluster-side-CRD-discriminator surface.