Project's Logo

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

Contribution Opportunities

  • Issues are available for contributions.
  • Project boards are active.
  • Wiki is available for documentation and guides.

License

Apache License 2.0

Topics

example
flux2
fluxcd
gitops
helm
kubernetes
kustomize

Recent Contributors

stefanprodan's avatar

stefanprodan

81 Contributions

hiddeco's avatar

hiddeco

3 Contributions

joebowbeer's avatar

joebowbeer

2 Contributions

bsord's avatar

bsord

1 Contributions

darioblanco's avatar

darioblanco

1 Contributions

LeoColomb's avatar

LeoColomb

1 Contributions

kisoku's avatar

kisoku

1 Contributions

nlamirault's avatar

nlamirault

1 Contributions

ruzickap's avatar

ruzickap

1 Contributions

raphapr's avatar

raphapr

1 Contributions

rverchere's avatar

rverchere

1 Contributions