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

[FR] check if an updated version of the image is available #31

Open
snqk opened this issue May 8, 2021 · 4 comments
Open

[FR] check if an updated version of the image is available #31

snqk opened this issue May 8, 2021 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@snqk
Copy link

snqk commented May 8, 2021

I propose a new check to check if a new version of the image is available.

k8s_image_availability_exporter_<TYPE>_update_available

Thoughts?

@zuzzas
Copy link
Contributor

zuzzas commented May 11, 2021

How would you define a "new image"? Using Docker Registry API semantics.

@Stonedge
Copy link

Stonedge commented May 4, 2022

The only way i could see that could be achieved is probably comparing tag...

I see 2 option here ....

  1. generic regex that would cover most common case...
  2. add annotation/label/config for custom tag format per image / deployment

Option1 generic regex:
^((?:version|v)?(?P<tagmajor>[0-9]{1,127})(?:[.\-_]?)?((?P<tagminor>[0-9]{1,127}))?(?:[.\-_]?)?((?P<tagpatch>[0-9]{1,127}))?(.*)?)$

covered version tag format:
1.2.3
v1.2
version1_2_4
ver-2.4-3
1.2.3-codename
1_2_3

so using something like when comparing available tag vs current tag:

Patch Available when tagmajor are equal, tagminor are equal, new tagpatch is greater
Minor Available when tagmajor are equal, new tagminor is greater
Major Available when new tagmajor is greater

Option 2:

would require a little more thinking ... but could be like a regex that return a number ... and if the previous returned number is lower than the current.... or regex than split tag in major minor patch format like option 1...

@snqk
Copy link
Author

snqk commented May 11, 2022

Semantic Versioning libraries also exist that can do this.

@nabokihms
Copy link
Member

This is a nice-to-have feature, yet still, the goal of the exporter is to highlight the problematic workloads that are already running in the cluster. Predicting future versions sounds like a duty of a fancy gitops tool like argocd.

Anyway, I'm good if someone wants to implement this feature under a flag.

@nabokihms nabokihms added the help wanted Extra attention is needed label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants