Skip to main content
Projects provide a logical grouping of applications with security and operational boundaries. They are especially useful when Argo CD is used by multiple teams.

Overview

AppProject is a Custom Resource Definition (CRD) that provides:
  • Source restrictions - Control which Git repositories can be deployed
  • Destination restrictions - Control where apps may be deployed (clusters and namespaces)
  • Resource restrictions - Control what kinds of Kubernetes objects can be deployed
  • RBAC - Define project roles with fine-grained permissions

AppProject CRD Structure

The Default Project

Every application belongs to a project. If unspecified, applications belong to the default project.

Default Project Specification

The default project is created automatically with permissive settings:
The default project can be modified but not deleted. For production use, create dedicated projects with explicit restrictions.

Locking Down Default Project

To prevent accidental use of the overly-permissive default project:

Creating Projects

Source Repository Restrictions

Control which Git repositories can be used:

Allow Specific Repositories

Using Wildcards

Denying Repositories

Use ! prefix to explicitly deny repositories:
A repository is valid if ANY allow rule permits it AND NO deny rule rejects it. The pattern !* is invalid.

Managing Sources via CLI

Destination Restrictions

Control where applications can deploy:

Specific Destinations

Using Cluster Names

Denying Destinations

Managing Destinations via CLI

Resource Restrictions

Cluster-Scoped Resources (Whitelist)

Only explicitly allowed cluster-scoped resources can be deployed:

Restrict by Name

Namespace-Scoped Resources (Blacklist)

All namespace-scoped resources are allowed except those blacklisted:

Managing Resources via CLI

Project Roles and RBAC

Define roles within projects for fine-grained access control:
Policy rules must follow the pattern proj:<project-name>:<role-name> to be effective during authorization.

Available Actions

Roles can control access to multiple resource types:
  • applications - Application resources
  • applicationsets - ApplicationSet resources
  • repositories - Repository credentials
  • clusters - Cluster credentials
  • logs - Application logs
  • exec - Exec into pod containers

Managing Roles via CLI

JWT Tokens for Automation

Generate JWT tokens for programmatic access:

Using JWT Tokens

Sync Windows

Define time windows when syncs are allowed or denied:

Source Namespaces

Restrict which namespaces can contain ApplicationSet resources:

Project-Scoped Repositories and Clusters

Allow developers to add repositories and clusters to projects:

RBAC Configuration

Adding Project-Scoped Repository

When using ApplicationSets with templated projects (containing {{ }}), only non-scoped repositories can be used.

Restrict to Project-Scoped Clusters

Force applications to only use clusters belonging to the same project:
With this setting, applications can only deploy to clusters that have project: my-project in their Secret.

Global Projects

Define global projects that other projects can inherit from:
Projects matching the label selector inherit:
  • namespaceResourceBlacklist
  • namespaceResourceWhitelist
  • clusterResourceBlacklist
  • clusterResourceWhitelist
  • syncWindows
  • sourceRepos
  • destinations

Destination Service Accounts

Specify service accounts for application deployments:

Best Practices

Use descriptive names

Name projects after teams or applications for clarity

Principle of least privilege

Start restrictive and add permissions as needed

Leverage deny patterns

Use ! patterns to explicitly block dangerous operations

Implement sync windows

Use sync windows for production change management

Enable project-scoped repos

Give teams self-service capabilities with proper RBAC

Use global projects

Share common policies across multiple projects