dmfrey / home-gitops

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

home-gitops

Core Components

GitOps

Flux watches my kubernetes folder (see Directories below) 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 kubernetes/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 some PRs are merged Flux applies the changes to my cluster.

Directories

This Git repository contains the following directories under kubernetes.

πŸ“ k8s-home-ops
β”œβ”€β”€ πŸ“ kubernetes                 # kubernetes configurations
β”‚   β”œβ”€β”€ πŸ“ apps                   # applications
β”‚   β”‚   └─ πŸ“ network             # namespace folder
β”‚   β”‚      └─ πŸ“ cert-manager     # application folder
β”‚   β”œβ”€β”€ πŸ“ bootstrap              # bootstrap procedures
β”‚   β”œβ”€β”€ πŸ“ flux                   # core flux configuration
β”‚   └── πŸ“ templates              # re-useable components
└── πŸ“ infrastructure             # infrastructure configuration

Cluster layout

Below is a a high level look at the layout of how my directory structure with Flux works. In this brief example you are able to see that authentik will not be able to run until cloudnative-pg is ready, which itself requires rook-ceph-cluster to be ready

flowchart TD
  id01>Kustomization: cluster] ==>|Creates| id02>Kustomization: cluster-apps]
  id02 ==>|Creates| id06>Kustomization: cluster-apps-rook-ceph]
  id02 ==>|Creates| id07>Kustomization: cluster-apps-rook-ceph-cluster]
  id02 ==>|Creates| id08>Kustomization: cluster-apps-cloudnative-pg]
  id02 ==>|Creates| id09>Kustomization: cluster-apps-authentik-database]
  id02 ==>|Creates| id10>Kustomization: cluster-apps-authentik]
  id06 ==>|Creates| id11(HelmRelease: rook-ceph-operator)
  id07 -.->|Depends on| id06
  id07 ==>|Creates| id12(HelmRelease: rook-ceph-cluster)
  id08 -.->|Depends on| id07
  id08 ==>|Creates| id13(HelmRelease: cloudnative-pg)
  id09 -.->|Depends on| id08
  id09 ==>|Creates| id14[PGCluster: pg-authentik]
  id10 -.->|Depends on| id09
  id10 ==>|Creates| id15(HelmRelease: authentik)

About


Languages

Language:CSS 88.1%Language:HCL 10.4%Language:Shell 1.5%