Source Controller
What you'll learn: How Flux's Source Controller watches and fetches declarative configuration from Git repositories, Helm repositories, and S3 buckets to keep your cluster in sync.
What Is the Source Controller?
The Source Controller is Flux's dedicated component that acts as a bridge between your external configuration sources and your Kubernetes cluster. Think of it as a librarian who continuously checks multiple library branches (Git repos, Helm repos, S3) for updated books (configurations) and makes them available for other Flux controllers to read and apply.
Unlike traditional pull-based systems that might poll on-demand, the Source Controller runs autonomously, fetching artifacts at defined intervals and storing them locally so other controllers (like Kustomize Controller or Helm Controller) can consume them without direct internet access.
Managing Sources with Custom Resources
You define sources declaratively using Flux's Custom Resources:
GitRepository — Connects to Git repositories (GitHub, GitLab, Bitbucket, etc.) HelmRepository — Points to Helm chart repositories (public or private) Bucket — Fetches from S3-compatible storage
Each resource specifies the source location, authentication credentials (via Kubernetes Secrets), and a sync interval. The Source Controller fetches the content, validates it, and generates a revision identifier. Other controllers watch these source objects and trigger reconciliation when revisions change.
Why This Matters
By separating source management from deployment logic, Flux achieves clean separation of concerns. Your Kustomize or Helm controllers don't need Git credentials or network access—they simply consume artifacts the Source Controller has already validated and staged. This improves security, enables offline testing, and makes multi-source deployments straightforward.
Key Takeaway:
Source Controller centralizes fetching from Git, Helm, and S3 sources, making configurations available as versioned artifacts that other Flux controllers consume for reconciliation.