-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Describe the bug
When the Agent receives the AppProject it doesn't update the namespace to reflect the namespace it is configured to use, as a result if you have the Principal and Agent in different namespaces it fails.
Steps to reproduce the behaviour
- Deploy Principal in one namespace (openshift-gitops-agent) on the control plane cluster
- Deploy the Agent in a different namespace (openshift-gitops) on its cluster
- Check the Agent logs to see this message.
time="2025-09-16T23:29:33Z" level=error msg="Unable to process incoming event" clientAddr="52.118.50.50:443" direction=Recv error="failed to validate source UID of appProject: appprojects.argoproj.io \"remote-cluster\" is forbidden: User \"system:serviceaccount:openshift-gitops:argocd-agent-agent\" cannot get resource \"appprojects\" in API group \"argoproj.io\" in the namespace \"openshift-gitops-agent\"" event_id=remote-cluster_14f172fe-adde-4535-8254-ab8e22171f74_184519 module=StreamEvent resource_id=remote-cluster_14f172fe-adde-4535-8254-ab8e22171f74 type=io.argoproj.argocd-agent.event.spec-update
Expected behavior
The Agent updates the AppProject namespace and creates it successfully in its own namespace.
Additional context
It should be checked if any other resources will have the same issue.
This is needed to support an Agent on the control-plane cluster since by definition in this situation the Agent will live in a different namespace then the Principal.
christianh814
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working