argocd-image-updater
argocd-image-updater copied to clipboard
Namespace support
Add --namespaced flag, that when true will only monitor the configured namespace for applications. If it is false, then monitor all namespaces for applications.
By default this is set to true to preserve the current behavior.
fixes https://github.com/argoproj-labs/argocd-image-updater/issues/601
(Picking this up from @iandelahorne - https://github.com/argoproj-labs/argocd-image-updater/pull/612#issuecomment-1910674396)
Thanks @rossigee for picking this up.
Does this also solve the issue of wrong namespace when creating the ApplicationEvent?
I face the issue where image-updater throws an error in kube/kubernetes.go on line 128:
Event "xxxx" is invalid: involvedObject.namespace: Invalid value "xxxx": does not match event.namespace
I was thinking of testing to change the namespace used in the command:
result, err := client.Clientset.CoreV1().Events(app.ObjectMeta.Namespace).Create(client.Context, &event, metav1.CreateOptions{})
to use the namespace of the found app instead of the client.Namespace.
Hello, any update on this? Thx!
I need this-- I am happy to work with someone to get this handled.
Hi @jannfis, any chance you could take a look and provide some feedback here?
Sorry guys, I'm going to have to abandon this PR.
The reason is that ArgoCD image updater doesn't appear to fit my use case, as the majority of the image tags I need it to update appear on Application manifests that wrap Helm releases.
Here's an example...
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: myapp
namespace: mynamespace
spec:
project: myapp
destination:
server: "https://kubernetes.default.svc"
namespace: mynamespace
source:
chart: myapp
repoURL: registry.mydomain.lan/charts
targetRevision: 1.2.3
helm:
releaseName: myapp
valuesObject:
replicaCount: 1
image:
repository: registry.mydomain.lan/mynamespace/myapp
tag: "1.0-123-ce3e866"
As the repoURL is an OCI chart repository and not a git repo (as ArgoCD seems to assume!) it fails at the first step, as it can't git clone it !
As far as I can see there is no other way to manage the above manifest, so this tool is not going to work for me. I may have to try 'kobold' instead, but even that needs patching due to it not handling the split repository and tag style commonly found in Helm charts, as per the above example.