argocd-image-updater icon indicating copy to clipboard operation
argocd-image-updater copied to clipboard

regexp doesn't work

Open chukynax opened this issue 3 years ago • 9 comments

i use app of apps method i have following annotations in app description

  annotations:
    argocd-image-updater.argoproj.io/image-list: image_alias=image/path/
    argocd-image-updater.argoproj.io/image_alias.update-strategy: latest
    argocd-image-updater.argoproj.io/image_alias.force-update: "true"
    argocd-image-updater.argoproj.io/image_alias.ignore-tags: regexp:^[a-zA-Z].*

I expect that argocd-image-updater will update images beginning not with word, as pointed in regexp but i got latest tag all the time

argocd-image-updater version is argoprojlabs/argocd-image-updater:v0.11.0

chukynax avatar Dec 27 '21 13:12 chukynax

Sorry, I don't understand. Can you please tell me more about what you expect, and what you see?

jannfis avatar Dec 27 '21 15:12 jannfis

sorry, refactored topic, also i tried following example with no luck image

that variant also tried

argocd-image-updater.argoproj.io/signal.ignore-tags: 'regexp:^[a-zA-Z].*, regexp:^0.0.0.*'

chukynax avatar Dec 27 '21 16:12 chukynax

regexp:^[a-zA-Z].* will only match strings that start with alphanumeric letter. What kind of strings do you want to match?

jannfis avatar Dec 27 '21 16:12 jannfis

argocd-image-updater.argoproj.io/signal.ignore-tags: 'regexp:^[a-zA-Z].*, regexp:^0.0.0.*' i want exclude from update: latest, 0.0.0-sha, branch.sha

chukynax avatar Dec 27 '21 16:12 chukynax

Ah, now I understand, thanks. Unfortunately, regexp is not (yet) supported for ignore-tags annotation. You may want to consider to find regexp for using in allow-tags to only match what you are interested in. Then, you can consider adding ignore-tags: latest, 0.0.0-*

jannfis avatar Dec 27 '21 16:12 jannfis

okay, thank you

would be nice if you mention that in documentation ... can i have several regexp variants in allow-tags ?

chukynax avatar Dec 27 '21 17:12 chukynax

would be nice if you mention that in documentation ...

It actually is mentioned there: https://argocd-image-updater.readthedocs.io/en/stable/configuration/images/#ignoring-certain-tags

can i have several regexp variants in allow-tags ?

Not yet, but this is certainly something we should support in the future

jannfis avatar Dec 27 '21 17:12 jannfis

Forgot to mention: You can actually define your regexp to match multiple things, e.g. regexp:^(latest|master)$ would match either tag latest or master

jannfis avatar Dec 27 '21 17:12 jannfis

allow-tags: regexp:^[^a-zA-Z] will only allow tags that do not begin with a letter.

LS80 avatar Jan 18 '22 20:01 LS80