Advertisement
Intermediate ArgoCD, RBAC

How do you prevent a team from deploying to namespaces they don't own?

Short answer

Constrain the AppProject's destinations to the team's clusters/namespaces (with patterns like team-a-*). Even with sync rights, apps in that project can't target other namespaces, because the project rejects disallowed destinations at validation.

Save ArgoCD mock interview
Advertisement
AModel answer
Constrain the AppProject's destinations to the team's clusters/namespaces (with patterns like team-a-*). Even with sync rights, apps in that project can't target other namespaces, because the project rejects disallowed destinations at validation.
destinations:
  - server: '*'
    namespace: 'team-a-*'
Real-world example
Team A's apps can only deploy into team-a-* namespaces; a manifest targeting kube-system is rejected.
Likely follow-ups
  • What enforces the namespace limit? | Do sync rights override project destinations?
Related topics