Success reported on ImagePolicy when ImageRepository stalled
makkes opened this issue · 0 comments
makkes commented
When an ImageRepository's .spec.image
is changed to an invalid value then any refering ImagePolicy still reports success.
Steps to reproduce:
flux create image repository podinfo --image ghcr.io/stefanprodan/podinfo
- Wait until the repository reports a positive Ready condition.
k patch imagerepository -n flux-system podinfo -p '{"spec":{"image":"oci://stefanprodan/podinfo"}}' --type merge
- Wait until the repository reports a negative Ready condition and a Stalled condition.
flux create image policy --image-ref podinfo --select-semver=5.1.4 podinfo
After the last step the ImagePolicy's .status
field looks like this:
status:
conditions:
- lastTransitionTime: "2023-10-02T16:13:39Z"
message: Latest image tag for 'oci://stefanprodan/podinfo' resolved to 5.1.4
observedGeneration: 1
reason: Succeeded
status: "True"
type: Ready
latestImage: oci://stefanprodan/podinfo:5.1.4
observedGeneration: 1
However, the status should report a negative Ready condition until the ImageRepository is ready again.