Kustomization CRD from the kustomize.toolkit.fluxcd.io/v1 API; ArgoCD uses an Application CRD from argoproj.io/v1alpha1. In ubx, the difference is just the type label on the sync block: sync "flux" instead of sync "argocd". The attribute shapes are identical — repo, path, target, namespace, values — because ubx’s sync abstraction treats both controllers as implementations of the same interface. Switch your GitOps controller, change one word in your .iac file.
What you’ll learn
- How
sync "flux"emits a FluxKustomizationCRD - How
sync "flux"andsync "argocd"share the same attribute shape - When to choose Flux vs ArgoCD (and why ubx makes the switch trivial)
Why this matters
ubx’s
sync abstraction is controller-agnostic. A team that starts with ArgoCD and later migrates to Flux changes one word in each sync block. The infrastructure provisioning, the Pending type wiring, the sequencing — nothing else changes.The source code
How it works
sync 'flux' emits a Flux Kustomization CRD
The type label
"flux" tells ubx to generate a kustomize.toolkit.fluxcd.io/v1/Kustomization object instead of an ArgoCD Application. The repo, path, and namespace attributes map to the corresponding Flux Kustomization spec fields.The attribute model is identical to sync 'argocd'
Both sync types use the same
repo, path, target, namespace, and values attributes — ubx normalises the differences between the two CRD schemas. The values map compiles to Flux’s spec.postBuild.substitute substitution variables rather than ArgoCD’s Helm parameters.sync “argocd” vs sync “flux” — side by side
target attribute is optional for Flux (defaults to the in-cluster endpoint). Otherwise the blocks are identical.
What ubx generates
Common mistakes
Run it
What you learned
sync "flux" emits a kustomize.toolkit.fluxcd.io/v1/Kustomization CRDThe attribute shape is identical to
sync "argocd" — switching controllers is a one-word changeFlux requires a
GitRepository source object to exist before the Kustomization can reconcileNext steps
exec block
Run a command at apply time as part of the resource graph
sync block reference
Full sync block syntax for both ArgoCD and Flux
Full runnable example: github.com/ubiquex/ubx-examples/27-sync-flux-kustomization

