From cd87435d8ec83cb15a495a2b81bba3a956ae44b7 Mon Sep 17 00:00:00 2001 From: CodeGit Date: Fri, 4 Sep 2026 10:59:25 +0100 Subject: [PATCH] fix: move Flux image-automation marker to a trailing comment The $imagepolicy marker was on the line above image:, not a trailing comment on that line. Flux's Setters strategy attaches YAML comments to the node on their own line, so a marker on a preceding line never associates with the field below it - the marker silently matched nothing, which is why ImageUpdateAutomation logged "repository up-to-date" on every reconcile regardless of what ImagePolicy resolved to, and never once committed a tag update despite two successful image builds. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Y4YNpuC2bgT224suQLLJ7B --- apps/hello-app/deployment.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/hello-app/deployment.yaml b/apps/hello-app/deployment.yaml index 4562f25..6af6c37 100644 --- a/apps/hello-app/deployment.yaml +++ b/apps/hello-app/deployment.yaml @@ -23,13 +23,15 @@ spec: # - name: forgejo-registry containers: - name: hello-app - # Not a comment — this exact-format annotation is how Flux's - # image-automation "Setters" strategy (image-automation.yaml's - # ImageUpdateAutomation) finds this line and knows to rewrite the - # tag below in place, rather than needing this field templated. + # The trailing comment on the image line below (not this one) is + # how Flux's image-automation "Setters" strategy finds this field + # and knows to rewrite the tag in place, rather than needing it + # templated. It must be a trailing comment on the image: line + # itself - Flux's YAML parser attaches comments to the node on + # their own line, so a marker on a line above never associates + # with the field below it and silently never matches anything. # "hello-app:hello-app" is ":". - # {"$imagepolicy": "hello-app:hello-app"} - image: git.boglabob.com/codegit/hello-app:latest + image: git.boglabob.com/codegit/hello-app:latest # {"$imagepolicy": "hello-app:hello-app"} ports: - containerPort: 80 ---