-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support regex image tag filtering #1239
Comments
semver tagging is #706. Would you mind explaining in more detail why what is proposed there is insufficient? One of the advantages of semver is that it provides an order, i.e. you can always determine which is the "best" version. That is not the case for a regexp match. |
Edge cases where images are not published using semver. The Docker ecosystem is already huge - and growing every day. One of the ideas behind Docker images it that they should be reusable. With this comes the problem that everyone has their own tagging strategy and semver is not as common as one may think. I think this addition would make Flux 'feature complete' for 99% of the edge case scenarios as it allows complex filtering.
This is true, but this is also not the case for the current Imagine the following scenario: you have a With a regex you could filter out this As an addition @squaremo provides an additional issue that
Taking all this in consideration: I think #706 should have a higher priority as it is easier for a user to configure and will also solve the scenario described above. However, for edge cases that require complex filtering - because someone has other ideas or you really enjoy doing exotic stuff with your tags - this should be added to Flux when there is time. |
With regard to exactly this scenario, semver filtering with |
At the moment Flux only offers support for wildcard filtering (e.g.
prod-*
,v1.8.*
, etc).This works perfectly fine if you are in control of how the images are getting tagged, however, if you are using images from an external vendor you will run in to problems pretty fast.
It is a common pattern to build additional images on top of a base image and tag them with a suffix describing the addition (e.g.
1.0
and1.0-jmx
, see for an example https://hub.docker.com/r/datadog/agent/tags/). These images will get rolled out last so Flux will detect them as the eligible new image (as it looks for the last published images that matches the filter requirements).I briefly discussed this issue some weeks ago with @squaremo on Slack who proposed a
semver:^1.8
solution (as an addition toglob:1.8.*
). I do however think this solution would be insufficient as semver tagging is as common as using the latest commit hash.Instead I would like to propose a regex filter option that looks for pattern matches, this is highly configurable and can get as complex (and nasty) as required. Eliminating issues with whatever weird tag the user wants to keep track of.
The text was updated successfully, but these errors were encountered: