How fluxcd/flux2 works
Flux v2’s repository here is the flux command-line client, not the GitOps Toolkit controllers themselves. A user invokes commands to bootstrap or manage a cluster: the CLI supports source and workload operations, reconciliation and status inspection, image automation, notifications, Helm releases, and plugin management. Bootstrap has plain-Git and provider-backed implementations; supporting packages generate manifests and apply them to Kubernetes. The README documents broader toolkit capabilities, but their controllers are outside this tree. Several command families are unsampled, so their internal call links are omitted.
Main entry points: bootstrap.go Bootstrap orchestration · bootstrap_plain_git.go Plain Git bootstrap · apply.go Cluster apply · main.go Flux command
Components 20
CLI commands
- Flux command
cmd/flux/main.go - Sources
cmd/flux/source.go - Kustomizations
cmd/flux/kustomization.go - Helm releases
cmd/flux/helmrelease.go - Image automation
cmd/flux/image.go - Notifications
cmd/flux/alert.go - Flux uninstall
pkg/uninstall/uninstall.go
Bootstrap
- Bootstrap command
cmd/flux/bootstrap.go - Bootstrap orchestration
pkg/bootstrap/bootstrap.go - Plain Git bootstrap
pkg/bootstrap/bootstrap_plain_git.go - Provider bootstrap
pkg/bootstrap/bootstrap_provider.go - Provider factory
pkg/bootstrap/provider/factory.go
Manifest operations
- Install manifests
pkg/manifestgen/install/manifests.go - Sync manifests
pkg/manifestgen/sync/sync.go - Kustomize generation
pkg/manifestgen/kustomization/kustomization.go - Cluster apply
internal/utils/apply.go
Extensions
- Plugin catalog
internal/plugin/catalog.go - Plugin installation
internal/plugin/install.go
Other components
- Cluster operator
- Kubernetes API
Connections 20
- Cluster operator → Flux command: runs commands
cmd/flux/main.go - Flux command → Bootstrap command: bootstraps
- Bootstrap command → Bootstrap orchestration: invokes
- Bootstrap orchestration → Plain Git bootstrap: uses Git mode
- Bootstrap orchestration → Provider bootstrap: uses provider mode
- Provider bootstrap → Provider factory: creates provider
pkg/bootstrap/bootstrap_provider.go - Bootstrap orchestration → Install manifests: generates components
pkg/bootstrap/bootstrap.go - Plain Git bootstrap → Install manifests: generates components
pkg/bootstrap/bootstrap_plain_git.go - Plain Git bootstrap → Sync manifests: generates sync
pkg/bootstrap/bootstrap_plain_git.go - Plain Git bootstrap → Cluster apply: applies sync
pkg/bootstrap/bootstrap_plain_git.go - Cluster apply → Kustomize generation: builds Kustomize
internal/utils/apply.go - Cluster apply → Kubernetes API: applies resources
- Cluster operator → Sources: manages sources
README.md - Cluster operator → Kustomizations: manages deployments
README.md - Cluster operator → Helm releases: manages releases
README.md - Cluster operator → Image automation: automates image updates
README.md - Cluster operator → Notifications: configures alerts
README.md - Cluster operator → Flux uninstall: uninstalls Flux
- Cluster operator → Plugin catalog: searches plugins
- Plugin catalog → Plugin installation: installs selected plugin