-
Notifications
You must be signed in to change notification settings - Fork 67
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
ImageRepository status.lastScanResult.latestTags not sorted acc. to semver #443
Comments
Hi, it seems there's a misunderstanding of what this field is for. Based on it's origin, refer #311 (comment), it was added with the intention to show a sample of the latest tags that were read in the last scan. This could be used to debug the tags that were used in the ImagePolicy. For example, if an exclusion list is specified, the sample tags can be used to get an idea of the tags that will be used in ImagePolicy. |
Ah, got it. You're right, the |
I'm not sure if we'd like to do such extra computation which may not be used by ImagePolicy. ImagePolicy has it's own set of filters that it applies on all the data it reads from the database of ImageRepository. The purpose of ImageRepository is only to fetch the tags which can then be used by others. If ImageRepository adds these latest sorted latest results, it'd be doing a part of the job ImagePolicy does. It may lead to a use case where someone may ask to refer an ImageRepository from ImageUpdateAutomation, instead of an ImagePolicy. That changes the overall design of the components maybe for good or bad. |
you're right. |
Hey there,
thank you very much for you great effort with flux.
Now the 'bug' 😇 : my
ImageRepository
status looks like:but actually there are newer tags
2.10.x
, also the related ImagePolicy is fine withstatus.latestImage: my-image:2.10.14
.Sorting of the
latestTags
is alphabetical, ref.: https://github.com/fluxcd/image-reflector-controller/blob/main/internal/controller/imagerepository_controller.go#L626As the ImageRepository doesn't know the tag semantics, maybe sorting by freshness (image date desc) would make more sense?
The text was updated successfully, but these errors were encountered: