From 267e57d1fcf2e855d5c5e57679ed04bc1278bd7d Mon Sep 17 00:00:00 2001 From: CodeGit Date: Fri, 4 Sep 2026 00:25:27 +0100 Subject: [PATCH] Updated docs to describe installation of all required flux components --- apps/hello-app/image-automation.yaml | 6 +++--- docs/03-flux.md | 14 +++++++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/apps/hello-app/image-automation.yaml b/apps/hello-app/image-automation.yaml index b1391d3..e73c8ad 100644 --- a/apps/hello-app/image-automation.yaml +++ b/apps/hello-app/image-automation.yaml @@ -3,7 +3,7 @@ # when one shows up. Requires clusters/homelab/flux-system to have write # access to the Forgejo repo (flux bootstrap sets this up). -apiVersion: image.toolkit.fluxcd.io/v1beta2 +apiVersion: image.toolkit.fluxcd.io/v1 kind: ImageRepository metadata: name: hello-app @@ -15,7 +15,7 @@ spec: # secretRef: # name: forgejo-registry --- -apiVersion: image.toolkit.fluxcd.io/v1beta2 +apiVersion: image.toolkit.fluxcd.io/v1 kind: ImagePolicy metadata: name: hello-app @@ -30,7 +30,7 @@ spec: pattern: '^main-[a-f0-9]+-(?P\d+)$' extract: '$ts' --- -apiVersion: image.toolkit.fluxcd.io/v1beta1 +apiVersion: image.toolkit.fluxcd.io/v1 kind: ImageUpdateAutomation metadata: name: hello-app diff --git a/docs/03-flux.md b/docs/03-flux.md index 679f215..98fd232 100644 --- a/docs/03-flux.md +++ b/docs/03-flux.md @@ -38,6 +38,15 @@ from `docs/01-bootstrap.md` step 4, not SSH (Forgejo's git-SSH port turned out not to be reliably reachable from either this desktop or the T630 — see the earlier troubleshooting in this project's history): +`flux bootstrap` only installs its four core controllers +(`source-controller`, `kustomize-controller`, `helm-controller`, +`notification-controller`) unless told otherwise. hello-app's image +automation (step 7 below — `ImageRepository`/`ImagePolicy`/ +`ImageUpdateAutomation`) needs two more, `image-reflector-controller` and +`image-automation-controller`, which are opt-in via `--components-extra`; +without it, hello-app's `Kustomization` fails dry-run with "no matches for +kind ImageRepository" since the CRD was never installed. + ```sh flux check --pre --kubeconfig ~/.kube/config-manual @@ -48,6 +57,7 @@ flux bootstrap git \ --username=codegit \ --password= \ --token-auth \ + --components-extra=image-reflector-controller,image-automation-controller \ --kubeconfig ~/.kube/config-manual ``` @@ -89,7 +99,9 @@ kubectl -n flux-system get deployments ``` `source-controller`, `kustomize-controller`, `helm-controller`, -`notification-controller`. Alongside them, it registered the CRDs those +`notification-controller`, plus `image-reflector-controller` and +`image-automation-controller` from `--components-extra` above. Alongside +them, it registered the CRDs those controllers understand: ```sh