Repository Structure and Multi-Tenancy
The four documented Flux repository layouts and their tradeoffs, plus the tenant isolation model built on service account impersonation and cross-namespace reference lockdown.
Overview
When layout becomes the problem
Once Flux runs on more than one cluster, the interesting problems stop being about controllers and start being about directory layout. The Flux docs answer three questions specifically enough that an interviewer can tell in thirty seconds whether you have run a fleet or only a demo cluster.
- Where do cluster-specific manifests live? In clusters/, as a directory of pointers.
- How does one base serve twelve clusters without twelve copies? With overlays plus postBuild substitution.
- How do five teams deploy without touching each other? With impersonation plus controller flags.
This chapter takes them in that order, starting with the layout itself.
Key concepts
- Cluster entry-point directory
- spec.dependsOn
- postBuild substitution
- Tenant impersonation
- --no-cross-namespace-refs
- --default-service-account
- --no-remote-bases
- Soft vs hard multi-tenancy
Interview questions
- Draw the monorepo layout Flux recommends and explain what each directory is for.
- When would you move off the monorepo, and what do you give up?
- How do you run twenty clusters from one repository without duplicating manifests?
- Explain Flux multi-tenancy end to end. What stops tenant A from touching tenant B?
- How does Flux multi-tenancy compare to Argo CD AppProject, and when does each fit better?
Sign up free to read the full topic
More DevOps topics
- Python for Build Automation
- Qt Deployment and Packaging
- Qt for Build Engineers
- Release Engineering
- Release Manifests & Last-Known-Good
- Repositories and OCI Distribution
- Running AI/ML Workloads on Kubernetes
- Runtime Security
- Sanitizers and Memory Debugging
- SAST, DAST, SCA & IAST
- Secrets Management in GitOps
- Securing Repositories and CI/CD — GitHub, GitHub Enterprise Server, GitLab and Azure DevOps
Start free on Cariara · Coding problems · System design studio