version-checker icon indicating copy to clipboard operation
version-checker copied to clipboard

add a priority label

Open roelarents opened this issue 1 year ago • 4 comments

In our use case we have many images and we'd like to be able to prioritize better. In order to sort by arbitrary priority, this PR adds a priority label (set as an annotation).

roelarents avatar Oct 22 '24 08:10 roelarents

This Pull Request is stale because it has been open for 60 days with no activity. It will be closed in 7 days if no further activity.

github-actions[bot] avatar Jan 21 '25 01:01 github-actions[bot]

Thx for checking!

Our use case is the latter. We have ~100 images and with prometheus/grafana we want the most important ones on top. We use priorities from zero (default) to 10.

Regarding the extra label: a label is added, but with a stable value. That should not increase cardinality, I think. Same amount of time series.

roelarents avatar Jan 24 '25 09:01 roelarents

Thanks for the response, and sorry for the delay in getting back to you.

I'm not 100% sure on this one - I can see the usecase of wanting things like grafana:latest to be up to date and reported in your Alerts/Graphs etc... but I feel that these could be added at a later time in a more manageable and meaning way.. again similar to that of https://github.com/jetstack/version-checker/pull/296#issuecomment-2612064340

metrics_relabel_configs:
  - source_labels: [image]
    regex: "grafana\:(.*)"
    target_label: priority
    replacement: "1000"
    action: replace

Similar could also be done based off namespace and any other pods/containers within the existing set of metrics exposed by version-checker without any code changes.

davidcollom avatar Mar 24 '25 17:03 davidcollom

I agree metric_relabel_configs could be used here. I don't know if it would be more manageable and meaningful. The config would be moved to the general prometheus config instead of the version-checker config.

roelarents avatar Mar 25 '25 15:03 roelarents

This Pull Request is stale because it has been open for 60 days with no activity. It will be closed in 31 days if no further activity.

github-actions[bot] avatar Jul 30 '25 02:07 github-actions[bot]