argoproj-labs / argocd-image-updater

Automatic container image update for Argo CD
https://argocd-image-updater.readthedocs.io/en/stable/
Apache License 2.0
1.29k stars 265 forks source link

Events not correctly sent #260

Open magmax opened 3 years ago

magmax commented 3 years ago

Describe the bug Events when updating images are not correctly sent, probably because the namespace contains a hyphen -:

time="2021-09-20T10:14:47Z" level=warning msg="Event could not be sent: namespaces \"\\\"argo-cd\\\"\" not found" application=whatever

To Reproduce Steps to reproduce the behavior:

  1. deploy an application to a namespace containing hyphens
  2. configure argocd to point to that namespace
  3. try to update an image.

Expected behavior The event should be sent and no warning should appear in the log.

Additional context

Version 0.10.0

Logs

time="2021-09-20T10:14:47Z" level=warning msg="Event could not be sent: namespaces \"\\\"argo-cd\\\"\" not found" application=whatever
zswanson commented 3 years ago

FWIW I'm not seeing any warning logs like this but we're also running image-updater 0.10.0, and the namespace is argocd-image-updater

edit to add, I'm also not seeing events though

andrei-dascalu commented 2 years ago

I am seeing this when using image updater 0.12.0

time="2022-08-12T09:09:18Z" level=warning msg="Event could not be sent: Event \"<myapp>.170a8dd4fe160d18\" is invalid: involvedObject.namespace: Invalid value: \"argocd\": does not match event.namespace" application=<myapp>

Where I have an application name myapp in namespace myapp restricted to its own namespace. image updater and argocd deployed to their own namespaces.

anonymousmaharaj commented 1 month ago

Any updates? I facing this issue too. My Image-updater and argocd in different clusters but API is correct work, as I understand because image-updater see the applications and images.