debug: test same-namespace ImagePolicy for Setters resolution

Every official Flux example uses the same namespace for ImagePolicy and
ImageUpdateAutomation; our setup splits them (ImagePolicy in hello-app,
ImageUpdateAutomation in flux-system). Testing whether that cross-namespace
split is the actual blocker, despite being documented as supported.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y4YNpuC2bgT224suQLLJ7B
This commit is contained in:
CodeGit 2026-09-04 11:34:07 +01:00
parent 3970d6acfc
commit a22034d81d

View file

@ -1,4 +1,22 @@
# Throwaway diagnostic file - delete once the Setters investigation is done. # Throwaway diagnostic file - delete once the Setters investigation is done.
# Testing whether a same-namespace-as-ImageUpdateAutomation ImagePolicy
# resolves differently than the existing cross-namespace one.
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImagePolicy
metadata:
name: hello-app-samens-test
namespace: flux-system
spec:
imageRepositoryRef:
name: hello-app
namespace: hello-app
policy:
numerical:
order: asc
filterTags:
pattern: '^main-[a-f0-9]+-(?P<ts>\d+)$'
extract: '$ts'
---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@ -6,3 +24,4 @@ metadata:
namespace: hello-app namespace: hello-app
data: data:
image: git.boglabob.com/codegit/hello-app:latest # {"$imagepolicy": "hello-app:hello-app"} image: git.boglabob.com/codegit/hello-app:latest # {"$imagepolicy": "hello-app:hello-app"}
image_samens: git.boglabob.com/codegit/hello-app:latest # {"$imagepolicy": "flux-system:hello-app-samens-test"}