Remove the throwaway setter-test.yaml and revert update.path to ./apps/hello-app. Root cause of ImageUpdateAutomation never committing a tag update remains unresolved after exhausting marker syntax, path scoping, field structure, namespace placement, RBAC, and version compatibility as candidates - all checked out fine individually. Moving on to docs/04-tofu.md; may retest after Flux gets a fresh bootstrap against the new cluster there. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4YNpuC2bgT224suQLLJ7B
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
# Flux image automation: watches the Forgejo registry for new hello-app
|
|
# tags, and rewrites deployment.yaml's image tag + commits back to this repo
|
|
# 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/v1
|
|
kind: ImageRepository
|
|
metadata:
|
|
name: hello-app
|
|
namespace: hello-app
|
|
spec:
|
|
image: git.boglabob.com/codegit/hello-app
|
|
interval: 1m
|
|
# Uncomment + create the secret if the package is private.
|
|
# secretRef:
|
|
# name: forgejo-registry
|
|
---
|
|
apiVersion: image.toolkit.fluxcd.io/v1
|
|
kind: ImagePolicy
|
|
metadata:
|
|
name: hello-app
|
|
namespace: hello-app
|
|
spec:
|
|
imageRepositoryRef:
|
|
name: hello-app
|
|
policy:
|
|
numerical:
|
|
order: asc
|
|
filterTags:
|
|
pattern: '^main-[a-f0-9]+-(?P<ts>\d+)$'
|
|
extract: '$ts'
|
|
---
|
|
apiVersion: image.toolkit.fluxcd.io/v1
|
|
kind: ImageUpdateAutomation
|
|
metadata:
|
|
name: hello-app
|
|
namespace: flux-system
|
|
spec:
|
|
interval: 1m
|
|
sourceRef:
|
|
kind: GitRepository
|
|
name: flux-system
|
|
git:
|
|
checkout:
|
|
ref:
|
|
branch: main
|
|
commit:
|
|
author:
|
|
email: flux@boglabob.com
|
|
name: fluxcdbot
|
|
messageTemplate: |
|
|
chore(hello-app): auto-update image to {{range .Updated.Images}}{{println .}}{{end}}
|
|
push:
|
|
branch: main
|
|
update:
|
|
path: ./apps/hello-app
|
|
strategy: Setters
|