Ravindra BagaleCourses & study guides मराठी

Chapter 86: Argo CD (GitOps)

DevOps

86.7 RBAC, AppProjects and SSO awareness

Story. A Deloitte-style bank project in Mumbai gave every developer cluster-admin on day one. Within a month someone synced a toy app into kube-system. They introduced Argo CD AppProjects: the payments team could only sync into payments-* namespaces from their deploy repo. Login moved from the initial admin user toward SSO (OIDC) with Dex — you should know the idea even if class still uses admin.

SSO identifies the user. Argo CD RBAC and AppProjects limit which repos and namespaces they can sync.
SSO identifies the user. Argo CD RBAC and AppProjects limit which repos and namespaces they can sync.

Why

GitOps without boundaries still lets the wrong person sync the wrong thing.

What

  • AppProject — Boundary: which source repos, destinations and cluster resources an app may use.
  • RBAC — argocd-rbac-cm policies (roles like role:developer).
  • SSO awareness — Dex (or another OIDC path) so people log in with company identity.
  • default project — Fine for labs; too open for shared prod clusters.

How

  1. Create an AppProject for a team.
  2. Allow only their Git repos and namespaces.
  3. Map SSO groups to Argo CD roles in real companies.
  4. Remove reliance on the initial admin password.

Example 1: Tight AppProject (awareness)

apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
  name: payments
  namespace: argocd
spec:
  description: Payments team apps
  sourceRepos:
    - 'https://git.example.com/payments/*'
  destinations:
    - namespace: 'payments-*'
      server: https://kubernetes.default.svc
  clusterResourceWhitelist:
    - group: ''
      kind: Namespace

What it shows: Payments apps cannot point at a random repo or sync into kube-system.

Example 2: Who am I in the CLI

argocd account get-user-info

Output

Logged In: true
Username: admin
Issuer: argocd

What it shows: Lab login is still local admin. In companies you expect an SSO issuer instead.

Ravindra Bagale's Tip

Never leave the initial admin password as the only long-term login on a shared cluster.

Quick quiz

Q1. What does an AppProject limit?

Allowed source repos, destinations and often cluster resources.

Q2. Why SSO?

So people use company identity instead of a shared admin password.

Q3. Is the default project enough for prod multi-team?

Usually no — it is too open.

Did you understand? Let us try it once more.