pub const FLUX_KIND_GIT_REPOSITORY: &str = "GitRepository";Expand description
Canonical FluxCD GitRepository CRD kind discriminator every
caixa-flux-emitted document that names a Flux v2 GitRepository
at a KUBE_KEY_KIND-rooted axis declares. Paired peer to the
sibling FLUX_GITREPOSITORY_API_VERSION (8a6c8a3) — 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 ("source.toolkit.fluxcd.io/v1", "GitRepostiory")
typo at any one of the three production-code call sites lands
outside the registered Flux v2 source-controller CRD’s
RESTKind lookup, surfacing apply-side as a non-self-locating
“no kind ‘GitRepostiory’ is registered for version
‘source.toolkit.fluxcd.io/v1’” error far from the source
caixa.lisp / the renderer’s format-string template).
The single source of truth the rendered Flux bundle’s three
GitRepository-naming axes reach for:
- the rendered
gitrepository.yamldocument’s top-levelKUBE_KEY_KINDaxis (caixa-flux/src/lib.rs:505 — thegitrepoformat-string template); - the rendered
helmrelease.yamldocument’sspec.chart.spec.sourceRef.kindaxis (caixa-flux/src/lib.rs:556 — thehelmreleaseformat-string template), pointing back at the siblingGitRepositorythe chart sources from; - the rendered
kustomization.yamldocument’sspec.sourceRef.kindaxis (caixa-flux/src/lib.rs:591 — thekustomizationformat- string template), pointing back at the cluster’s bootstrapGitRepository(paired withDEFAULT_FLUX_SYSTEM_NAMESPACEon the namespace axis).
All three axes name the same K8s CRD discriminator and must move
together on any future Flux v3 rebrand (e.g. an upstream Flux v3
rename like GitSource). Until this lift landed the three axes
carried inline GitRepository literals across the three production-
code occurrences in caixa-flux/src/lib.rs:505, 556, 591 (the
cluster_bundle gitrepo + helmrelease + kustomization format-
string templates) plus a matching set inside the in-file
cluster_bundle_* test fixtures — six occurrences of the same load-
bearing FluxCD-CRD-kind-discriminator convention, drift-prone by
construction. A drift on the helmrelease.yaml
spec.chart.spec.sourceRef.kind site alone — the one apply-side
failure mode the apiserver can’t self-locate — would have silently
dangled the HelmRelease’s chart sourceRef (controller-side: the
helm-controller never resolves a chart for the HelmRelease, the
rendered Servico chart never reconciles, every per-Servico apply
silently comes up with the prior reconciled state) with no diagnostic
naming the kind-drift root cause far from the source caixa.lisp.
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 FLUX_HELMRELEASE_API_VERSION (55f0fd9) /
FLUX_GITREPOSITORY_API_VERSION (8a6c8a3) /
FLUX_KUSTOMIZATION_API_VERSION (d2dd1b1) lifts established on
the sibling Flux-v2-load-bearing-string axes — extends the
discipline from the apiVersion half of the (apiVersion, kind)
CRD-lookup tuple onto the kind half on the same Flux v2
source-controller CRD. The three render-side consumers now thread
the same &'static str through their format-string templates so a
future Flux v3 rebrand lands in one place; every future renderer
that reaches for the canonical Flux v2 GitRepository kind (the
future M4 mesh.pleme.io/v1alpha1/Aplicacao CR materializer’s
per-Aplicacao GitRepository, a future per-edge GitRepository
the operator emits for the CiliumClusterwideEnvoyConfig pipeline,
a future caixa-otel collector-pipeline GitRepository) inherits
the same value by construction with no opportunity for per-renderer
drift.
Same “the typed constant lives in one place” discipline the
FLUX_HELMRELEASE_API_VERSION (55f0fd9) /
FLUX_GITREPOSITORY_API_VERSION (8a6c8a3) /
FLUX_KUSTOMIZATION_API_VERSION (d2dd1b1) /
DEFAULT_FLUX_SYSTEM_NAMESPACE (7197d38) lifts apply on the peer
canonical-Flux-v2-load-bearing-string surface.