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