Interview Prep/GitOps & Argo CD/Repos, Clusters, Projects & Permissions

Sync fails with `resource :Namespace is not permitted in project team-a.`

IntermediateTroubleshootingRepos, Clusters, Projects & Permissions
Answer

Likely causes → Namespace is a cluster-scoped kind, and the project's clusterResourceWhitelist is empty (the default for a new project). The same happens for ClusterRole, CRD and other cluster-scoped kinds.

Diagnose → argocd proj get team-a -o yaml | yq '.spec.clusterResourceWhitelist'.

Fix → Either let the platform team create the namespace and use CreateNamespace=true only where allowed, or whitelist the specific kind:

clusterResourceWhitelist:
  - group: ""
    kind: Namespace

Prevent → Keep cluster-scoped resources in a platform-owned project; tenants get namespaced kinds only.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on Repos, Clusters, Projects & Permissions