pub const FLUX_KEY_SOURCE_REF: &str = "sourceRef";Expand description
Canonical Flux v2 per-HelmRelease/Kustomization source-reference
container-axis key every caixa-flux-emitted bundle document mounts its
per-CR source-of-truth pointer under (spec.chart.spec.sourceRef on
HelmRelease, spec.sourceRef on Kustomization) — the Flux v2 CRD
schema places the (kind, name, namespace) reference triple under this
single container key, so drift on the container axis is exactly as
load-bearing as drift on the sibling FLUX_KIND_GIT_REPOSITORY
(dbbcf29) kind-discriminator + DEFAULT_FLUX_SYSTEM_NAMESPACE
(7197d38) namespace axes the block nests (a "source_ref" / "source"
/ "sourceReference" / "gitSourceRef" typo at either the emit-side
format-string template or a downstream test-fixture probe silently
dangles the HelmRelease.spec.chart.spec.sourceRef chart resolution +
the Kustomization.spec.sourceRef source resolution at the Flux v2
source-controller’s CRD registration; the source-controller’s per-CR
reconcile loop keys off this exact container axis to source the
(kind, name, namespace) reference triple, and a drift silently freezes
the dependent per-Servico dependsOn chain at apply time with no
field naming the sourceRef-container-drift root cause).
The single source of truth the rendered Flux bundle’s per-CR source-reference-container-axis-naming reaches for:
- the rendered
helmrelease.yamldocument’s per-HelmReleasespec.chart.spec.sourceRefblock (caixa-flux/src/lib.rs — thecluster_bundlehelmreleaseformat-string template’s{source_ref_key}:\nsub-block header, now threaded through the lifted const via a{source_ref_key}named-arg interpolation); - the rendered
kustomization.yamldocument’s per-Kustomizationspec.sourceRefblock (caixa-flux/src/lib.rs — the siblingcluster_bundlekustomizationformat-string template’s{source_ref_key}:\nsub-block header, now threaded through the lifted const via the sibling{source_ref_key}named-arg interpolation); - five test-side navigation sites in
mod teststhat probe the rendered documents’.get("sourceRef")container axis to pin the emitted(kind, name, namespace)reference triple against the sibling liftedFLUX_KIND_GIT_REPOSITORY+DEFAULT_FLUX_SYSTEM_NAMESPACEaxes.
The container-axis key names the same Flux-v2-source-controller-side
per-CR source-of-truth reference-triple container as the sibling
per-CRD kind discriminator FLUX_KIND_GIT_REPOSITORY nests inside,
and must move together on any future Flux v3 rebrand (a hypothetical
upstream Flux v3 rename of the source-reference container axis from
sourceRef to source / sourceReference / sourceOf, coordinated
with the upstream fluxcd/flux2 project’s per-version deprecation
cycle, would land at this one const rather than scattered across the
two per-CR format-string templates + five per-test-fixture probe
sites).
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_KIND_GIT_REPOSITORY (dbbcf29) /
FLUX_KIND_HELM_RELEASE (e24ea3c) /
FLUX_KIND_KUSTOMIZATION (2d61a6f) /
FLUX_HELMRELEASE_API_VERSION (55f0fd9) /
FLUX_GITREPOSITORY_API_VERSION (8a6c8a3) /
FLUX_KUSTOMIZATION_API_VERSION (d2dd1b1) /
DEFAULT_FLUX_SYSTEM_NAMESPACE (7197d38) lifts established on the
sibling canonical-Flux-v2-load-bearing-string surfaces — extends the
per-CRD kind-discriminator + apiVersion + install-namespace lift
trajectory onto the sibling per-CR source-reference container-axis
key the cluster_bundle HelmRelease + Kustomization renderers
both consume under their nested (kind, name, namespace) reference
triple.