GitOps
Flux watches my cluster folder (see Directory structure) and makes the changes to my cluster based on the YAML manifests.
The way Flux works for me here is it will recursively search the cluster/apps folder until it finds the most top level kustomization.yaml
per directory and then apply all the resources listed in it. That aforementioned kustomization.yaml
will generally only have a namespace resource and one or many Flux kustomizations. Those Flux kustomizations will generally have a HelmRelease
or other resources related to the application underneath it which will be applied.
Renovate watches my entire repository looking for dependency updates, when they are found a PR is automatically created. When PRs are merged Flux applies the changes to my cluster.
Directory structure
My home-ops repository contains the following directories under cluster.
π cluster # My main kubernetes cluster
βββπ apps # Apps deployed into my cluster grouped by namespace (see below)
βββπ base # Flux entrypoint
βββπ core # Important applications that should never be pruned by flux
βββπ crds # Custom resource definitions (CRDs) that need to exist globally