Skip to content

Improve Principal Application adoption in Managed Mode. #950

@drewbailey

Description

@drewbailey

Is your feature request related to a problem? Please describe.

Today, when an Application exists on an Agent, and then an operator creates the same Application on a Principal cluster, the Agent silently ignores updates from the Principal.

This is scenario is currently hard to detect, and the agent behavior to get the application managed by the Principal is unclear.

On the principal side, the Application appears in an odd state
Unable to load data: error getting destination cluster

The agent log

time="2026-05-14T22:03:23Z" level=debug msg="skipping resource without source UID annotation" agent="{\"clientID\":\"m-ax-ea1-us\",\"mode\":\"managed\"}" event =io.argoproj.argocd-agent.event.response-synced-resource kind=Application method=processIncomingEvents mode=managed module=GrpcEvent name=myapp-m-ax-ea1-us namespace=project-myapp resource_id=38e5cb4c-4854-4a60-9cf0-58d2fc1f6daf uid=581d6693-0196-49c2-81c4-38724567180e

We intervened by deleting the application (non-cascading) on the agent cluster.

On the principal side, the application had already been requested to be refreshed, so there were no new events flowing to the agent. We ended up just restarting the agent pod, and it picked up the Application from the Principal.

Describe the solution you'd like

At a minimum, maybe a annotation added to the application on the Principal that it is currently being excluded/ignored, and a way for the Agent to sync/check the principal on Application delete, so that it gets picked up from the principal quicker.

I think it could also make sense to have a policy flag to allow a principal to adopt an existing Application in managed mode.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions