prometheus / alertmanager

Prometheus Alertmanager
https://prometheus.io
Apache License 2.0
6.6k stars 2.15k forks source link

Add docker tags for major/minor/patch versions #4004

Open Quadrubo opened 1 month ago

Quadrubo commented 1 month ago

Description

As of the point of writing this, v0.27.0 is the latest Alertmanager version. As I'm manually updating my images and not using something like "latest", I have to change the image tag every new release. It would be nice if I wouldn't have to do that for patch releases (minor releases too).

Currently these tags are provided:

Desired Behavior

I would propose a tag system like this:

This would allow pinning to specific version and allows the user to choose which semver types they are okay with auto updating. I for example would have pinned to v0 and would have automatically gotten the update to v0.27.0. I however will not get an auto update to v1.x which would be desired for me.

grobinson-grafana commented 1 month ago

I'm not sure this makes a lot of sense while Alertmanager is still in v0.x because if I understand semver, breaking changes are allowed in minor versions for v0.x. For example, v0.28 could have breaking changes from v0.27. I fear a lot of users will fall into this mistake and find their Alertmanager breaks without warning (for example, during the night).

The second issue is in Kubernetes, for example, unless the image tag is latest, you'll need to set ImagePullPolicy to always, otherwise even if there is a newer image with the same tag, Kubernetes will run on the old image as it's cached on the local disk.

My opinion is that this creates more problems than it solves.

Quadrubo commented 1 month ago

I don't think it creates problems as long as users are aware of it. You need to specifically decide to use those tags and I think anyone who does so, is aware of how versioning works.

I don't use Kubernetes but this doesn't seem like a problem specific to my suggestion but to all tagged images with newer versions.

There are also big official projects like MySQL or Python that do this.

grobinson-grafana commented 1 month ago

I think patch releases wildcards could make sense, like v0.28.x. I'm still not 100% sure on minor releases until Alertmanager reaches 1.0.