- Shell 100%
|
|
||
|---|---|---|
| .forgejo | ||
| .generated/apps/podinfo/overlays/digikluster | ||
| apps/podinfo | ||
| bin | ||
| .editorconfig | ||
| .gitignore | ||
| .mise.toml | ||
| .pre-commit-config.yaml | ||
| README.md | ||
| renovate.json | ||
$REPO_OWNER/$REPO_NAME
A Flux tenant repository. Flux applies each overlay in apps/ to the cluster. The core
repository holds the Flux Kustomization that points to an overlay of this repository.
Layout
apps/<app>/base/ The app: a HelmRepository and a HelmRelease
apps/<app>/overlays/<cluster>/ The app on one cluster: namespace, name prefix, patches
.generated/apps/<app>/overlays/... The output of kustomize build for each overlay, one file for each object
bin/generate-manifests.sh Writes .generated
.generated is in git. A reviewer sees in the diff of .generated what changes in the cluster.
Do not change .generated by hand.
Start
You need mise. It installs kustomize, kubectl-slice and pre-commit
from .mise.toml.
mise install
pre-commit install # runs bin/generate-manifests.sh before each commit
Change an overlay or a base, then commit. The pre-commit hook updates .generated. Without
pre-commit, run bin/generate-manifests.sh and commit .generated with the change.
Add an app
- Copy
apps/podinfotoapps/<app>. - Change the chart in
base/and the values inoverlays/digikluster/patches/. - Set
namespaceandnamePrefixinoverlays/digikluster/kustomization.yaml. - Run
bin/generate-manifests.sh. - Ask the platform team to add the Flux
Kustomizationfor the overlay in the core repository.
Pipeline
.forgejo/workflows/ci.yml builds each overlay, and fails when
.generated does not match. It runs on the label default, without root.
Renovate updates the chart versions in apps/, and then runs bin/generate-manifests.sh so that
.generated stays correct.
Files
| File | Purpose |
|---|---|
.mise.toml |
The versions of kustomize, kubectl-slice and pre-commit |
.pre-commit-config.yaml |
Runs bin/generate-manifests.sh before each commit |
renovate.json |
The shared Renovate presets; chart updates also update .generated |
.forgejo/template |
The files in which Forgejo fills in the name of a new repository |