cloud-demo/apps/hello-app/image-automation.yaml
CodeGit 99b6178a88 debug: test ImageUpdateAutomation with repo-root update.path
Diagnostic change - narrower ./apps/hello-app path never found anything
to update despite a byte-verified-correct marker, matching ImagePolicy
resolution, and no RBAC/duplicate-resource issues. Testing whether the
nested path itself is the problem before looking further.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y4YNpuC2bgT224suQLLJ7B
2026-09-04 11:14:45 +01:00

57 lines
1.3 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: ./
strategy: Setters