Repository navigation
feat(k8s): add Flux toolkit + Flux Operator CRDs (K8s::Flux::*) - #992
Merged
Merged
Conversation
Pin flux2 v2.9.1 and flux-operator v0.54.1 release bundles as CRD sources, generating 17 typed K8s::Flux::* classes across the five *.toolkit.fluxcd.io groups plus fluxcd.controlplane.io. All six groups collapse to a single Flux namespace via GROUP_NAMESPACE_OVERRIDES. Add an optional 'kinds' allowlist to CRDSource so a multi-doc install bundle generates only the intended kinds — the flux2 install.yaml also carries experimental ExternalArtifact/ArtifactGenerator, left out. Serializer round-trip test covers GitRepository, Kustomization, HelmRelease (v2), and FluxInstance GVKs; crd-classes docs gain a Flux section. Closes #858
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #858.
What
Adds the Flux GitOps Toolkit (flux2 v2.9.1) and the Flux Operator (v0.54.1) to the k8s lexicon's
CRD_SOURCES, generating 17 typedK8s::Flux::*classes with serializer, LSP, and MCP support — same machinery asDeploymentand the existing Argo CD CRDs.source.toolkit.fluxcd.io/v1kustomize.toolkit.fluxcd.io/v1helm.toolkit.fluxcd.io/**v2**notification.toolkit.fluxcd.io/**v1beta3**notification.toolkit.fluxcd.io/v1image.toolkit.fluxcd.io/v1fluxcd.controlplane.io/v1All six groups collapse to a single
Fluxnamespace viaGROUP_NAMESPACE_OVERRIDES(mirroring theargoproj.io → Argoprecedent).How
GROUP_NAMESPACE_OVERRIDES— six new entries →Flux.CRD_SOURCES— two entries pointing at the pinned releaseinstall.yamlbundles (deterministic, and trivial to bump from the self-upgrade cron: two version constants).kinds?: string[]allowlist onCRDSource— a releaseinstall.yamlis a multi-doc bundle of controllers + RBAC + CRDs; the parser already keeps only CRD docs, and the allowlist narrows those to the intended kinds. The flux2 bundle also carries the experimentalExternalArtifactandArtifactGenerator(a 7th group), both intentionally excluded — matching the issue's out-of-scope note. The primitive also serves the Crossplane support via k8s CRD import + semantic lint (not a new lexicon) #823 user-appended-bundle direction.Verification
The storage-version gotcha (
parser.tsemits each CRD'sstorage: trueversion) was confirmed against the real upstream YAML — for all 17 kinds the storage version equals the served version the issue specified, so no per-source version pinning was needed. Codegen produces exactly the 17 kinds with correct per-group GVK (HelmRelease→v2, Provider/Alert→v1beta3, Receiver→v1, rest→v1, operator→v1).npm run generate→ 17K8s::Flux::*classes, correct apiVersion/kind, no out-of-scope kindsnpm run build -w @intentius/chant-lexicon-k8s(CI "Generate lexicon artifacts" gate)vitest run lexicons/k8s— 820 passed, 1 skippedFluxkindsallowlist (keep-subset and no-filter paths)crd-classes.mdxgains a Flux section (kinds table, install commands, example) + the source-as-truth vs chant-lifecycle noteOut of scope (per issue)
ExternalArtifact,ArtifactGenerator, and Flagger (flagger.app) — trackable separately if wanted.