Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace support #672

Closed
wants to merge 4 commits into from
Closed

Conversation

rossigee
Copy link

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 #601

(Picking this up from @iandelahorne - #612 (comment))

iandelahorne and others added 4 commits October 31, 2023 16:31
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 argoproj-labs#611

Signed-off-by: Ian Delahorne <ian@patreon.com>
Signed-off-by: Ian Delahorne <ian.delahorne@gmail.com>
Use `app.QualifiedName()` instead of creating a namespace/name string.
In addition, I had erroneously removed trace statements, which are now back.

Signed-off-by: Ian Delahorne <ian.delahorne@gmail.com>
@ElanHasson
Copy link

Thanks @rossigee for picking this up.

@strangnet
Copy link

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.

@fad3t
Copy link

fad3t commented Apr 4, 2024

Hello, any update on this? Thx!

@ElanHasson
Copy link

I need this-- I am happy to work with someone to get this handled.

@ElanHasson
Copy link

Hi @jannfis, any chance you could take a look and provide some feedback here?

@rossigee
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image Updater does not work with "App in any namespace" Argo configuration
5 participants