-
Notifications
You must be signed in to change notification settings - Fork 66
Description
Problem
The https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster/ discovers target clusters by reading Argo CD cluster secrets and filtering them by labels (e.g. env=production, region=us-west-2). With self registering agents in argocd-agent, cluster secrets are created by the principal during self-registration, but there is no way for an agent to declare labels/annotations to add to the cluster secret.
A clear and concise description of what you want to happen.
Agent side (cmd/argocd-agent/agent.go, agent/options.go)
- Add
--cluster-labels key=val,key=valand--cluster-annotations key=val,key=valflags - Store as
map[string]strings on agent options - Send as part of the existing connect/auth handshake (extend the auth request proto, or a new dedicated RPC— see tradeoffs below)
Wire protocol two potential options:
- Extend the existing AuthRequest proto to carry cluster_labels / cluster_annotations map fields
- New RegisterAgent RPC called after auth
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.