fluxcd/flux2-kustomize-helm-example
This project, fluxcd/flux2-kustomize-helm-example, is a demonstration of how to use Flux and Kustomize to manage applications and infrastructure across multiple clusters, specifically a staging and production environment, while minimizing duplicated declarations. The project utilizes Helm for deploying applications and includes GitHub Actions for testing and continuous integration.
The repository structure consists of the following directories: apps, infrastructure, and clusters. The apps directory contains Helm releases with custom configurations for each cluster, infrastructure holds common infra tools, and clusters contains the Flux configuration for each environment.
The apps configuration is structured into base, production, and staging directories, with base containing common values for both clusters, and production and staging directories containing specific values for each environment. The infrastructure is structured into controllers and configs directories, with controllers holding Helm repository and release definitions, and configs containing Kubernetes custom resources.
The project includes prerequisites for a Kubernetes cluster version 1.28 or newer, a GitHub account, and the installation of the Flux CLI. The Flux configuration is stored in the clusters directory, with each environment having its own configuration file.
The project demonstrates how to use HelmRepository and HelmRelease custom resources to configure Flux to install, test, and upgrade a demo app using the specified Helm chart and semver ranges. It also shows how to use Kustomize patches to apply specific values for each environment.
The project includes GitHub Actions for testing and continuous integration, with the test workflow validating the Kubernetes manifests and Kustomize overlays using kubeconform, and the e2e workflow starting a Kubernetes cluster in CI and testing the staging setup by running Flux in Kubernetes Kind.
Project Information
- Repository: fluxcd/flux2-kustomize-helm-example
- Owner: fluxcd
- Language: Shell
- Created at: 2020-11-05
- Last Updated: 2024-10-17
- Homepage: fluxcd.io
Engagement Metrics
- Stars: 994
- Forks: 1062
- Open Issues: 10
- Watchers: 994
- Subscribers: 35
Contribution Opportunities
- Issues are available for contributions.
- Project boards are active.
- Wiki is available for documentation and guides.
License
Apache License 2.0
Topics
Recent Contributors
stefanprodan
81 Contributions
hiddeco
3 Contributions
joebowbeer
2 Contributions
bsord
1 Contributions
darioblanco
1 Contributions
LeoColomb
1 Contributions
kisoku
1 Contributions
nlamirault
1 Contributions
ruzickap
1 Contributions
raphapr
1 Contributions
rverchere
1 Contributions