Summary
Add a flux deployer type to the bundler, enabling generation of Flux CD deployment artifacts (HelmRelease, Kustomization, GitRepository sources) alongside the existing helm, argocd, and argocd-helm deployers.
Motivation
AICR currently supports three deployer types: helm (default), argocd, and argocd-helm. Organizations using Flux CD as their GitOps controller have no native bundle output — they must manually translate Helm bundles into Flux CRDs. A first-class flux deployer would close this gap and align AICR with the two dominant GitOps ecosystems (ArgoCD and Flux).
Scope
New deployer: pkg/bundler/deployer/flux/
Implement the deployer.Deployer interface (Generate(ctx, outputDir) (*Output, error)) producing:
| Artifact |
Purpose |
HelmRelease per Helm component |
Declares chart source, version, values |
Kustomization per Kustomize component |
Points to Git source + path |
HelmRepository / GitRepository sources |
Declares upstream chart repos and Git repos |
Root kustomization.yaml |
Orchestrates all resources with dependsOn ordering |
README.md |
Deployment instructions (flux reconcile, prerequisites) |
Registration changes
| File |
Change |
pkg/bundler/config/config.go |
Add DeployerFlux DeployerType = "flux", update ParseDeployerType and GetDeployerTypes |
pkg/bundler/bundler.go |
Add case config.DeployerFlux in buildDeployer() switch (~L282) |
pkg/bundler/bundler.go |
Add Flux mapping in runDeployer() result type (~L430) |
Config options to support
--repo-url and --target-revision (reuse existing config fields, same as ArgoCD)
--dynamic support TBD — may follow the argocd-helm pattern with valuesFrom / postBuild.substituteFrom
Flag compatibility (pre-flight validation in buildDeployer)
| Flag |
Supported |
Reason |
--attest |
No (initially) |
Same limitation as argocd-helm |
--data |
No (initially) |
Same limitation as argocd-helm |
--dynamic |
Deferred |
Needs design for Flux valuesFrom / postBuild mapping |
Output structure (proposed)
output/
├── README.md
├── kustomization.yaml # Root Kustomization referencing all resources
├── sources/
│ ├── helmrepo-<name>.yaml # HelmRepository per unique chart repo
│ └── gitrepo-<name>.yaml # GitRepository per unique Git source
├── cert-manager/
│ ├── helmrelease.yaml # HelmRelease CR (dependsOn ordering)
│ └── values.yaml # Helm values (inline or ConfigMap)
└── gpu-operator/
├── helmrelease.yaml
└── values.yaml
Implementation notes
- Follow the existing deployer pattern: struct with exported fields, compile-time interface check (
var _ deployer.Deployer = (*Generator)(nil))
- Use shared helpers from
pkg/bundler/deployer/helpers.go (SafeJoin, WriteValuesFile, GenerateFromTemplate, SortByDeploymentOrder)
- Deployment ordering maps to
dependsOn in HelmRelease/Kustomization CRs (analogous to ArgoCD sync-waves)
- Flux API versions:
source.toolkit.fluxcd.io/v1 and helm.toolkit.fluxcd.io/v2 (stable APIs)
- Kustomize components use
Kustomization CR pointing to GitRepository source with path/tag
Test plan
Summary
Add a
fluxdeployer type to the bundler, enabling generation of Flux CD deployment artifacts (HelmRelease, Kustomization, GitRepository sources) alongside the existinghelm,argocd, andargocd-helmdeployers.Motivation
AICR currently supports three deployer types:
helm(default),argocd, andargocd-helm. Organizations using Flux CD as their GitOps controller have no native bundle output — they must manually translate Helm bundles into Flux CRDs. A first-classfluxdeployer would close this gap and align AICR with the two dominant GitOps ecosystems (ArgoCD and Flux).Scope
New deployer:
pkg/bundler/deployer/flux/Implement the
deployer.Deployerinterface (Generate(ctx, outputDir) (*Output, error)) producing:HelmReleaseper Helm componentKustomizationper Kustomize componentHelmRepository/GitRepositorysourceskustomization.yamldependsOnorderingREADME.mdflux reconcile, prerequisites)Registration changes
pkg/bundler/config/config.goDeployerFlux DeployerType = "flux", updateParseDeployerTypeandGetDeployerTypespkg/bundler/bundler.gocase config.DeployerFluxinbuildDeployer()switch (~L282)pkg/bundler/bundler.gorunDeployer()result type (~L430)Config options to support
--repo-urland--target-revision(reuse existing config fields, same as ArgoCD)--dynamicsupport TBD — may follow theargocd-helmpattern withvaluesFrom/postBuild.substituteFromFlag compatibility (pre-flight validation in
buildDeployer)--attest--data--dynamicvaluesFrom/postBuildmappingOutput structure (proposed)
Implementation notes
var _ deployer.Deployer = (*Generator)(nil))pkg/bundler/deployer/helpers.go(SafeJoin,WriteValuesFile,GenerateFromTemplate,SortByDeploymentOrder)dependsOnin HelmRelease/Kustomization CRs (analogous to ArgoCD sync-waves)source.toolkit.fluxcd.io/v1andhelm.toolkit.fluxcd.io/v2(stable APIs)KustomizationCR pointing toGitRepositorysource with path/tagTest plan
flux.Generator.Generate()covering Helm, Kustomize, and mixed-component recipesHelmReleaseandKustomizationCR generationdependsOnordering matches recipe deployment order--attest,--data)aicr bundle --deployer fluxproduces valid Flux CRDs (YAML schema validation)ParseDeployerTypeandGetDeployerTypestests