Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Success reported on ImagePolicy when ImageRepository stalled #449

Open
makkes opened this issue Oct 2, 2023 · 0 comments
Open

Success reported on ImagePolicy when ImageRepository stalled #449

makkes opened this issue Oct 2, 2023 · 0 comments

Comments

@makkes
Copy link
Member

makkes commented Oct 2, 2023

When an ImageRepository's .spec.image is changed to an invalid value then any refering ImagePolicy still reports success.

Steps to reproduce:

  1. flux create image repository podinfo --image ghcr.io/stefanprodan/podinfo
  2. Wait until the repository reports a positive Ready condition.
  3. k patch imagerepository -n flux-system podinfo -p '{"spec":{"image":"oci://stefanprodan/podinfo"}}' --type merge
  4. Wait until the repository reports a negative Ready condition and a Stalled condition.
  5. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant