ArgoCD Project

October 09, 2023  1 minute read  

Projects: The Heart of Organization in Argo CD

Projects in Argo CD are like little kingdoms, each with its own rules and territories. They help you group applications, manage deployment sources, destinations, and even control what Kubernetes objects you can play with. Think of them as a way to keep your applications neatly organized and secure.

Starting Simple: The Default Project

Every journey in Argo CD begins with the default project. It’s the “anything goes” space where any app can be deployed from any repo to any cluster. Here’s what the default settings look like:

spec:
  sourceRepos:
  - '*'
  destinations:
  - namespace: '*'
    server: '*'
  clusterResourceWhitelist:
  - group: '*'
    kind: '*'

Crafting Your Own Projects

Want more control? Create custom projects! For example, if you want a project just for your team’s namespace, use this command:

argocd proj create myproject -d https://kubernetes.default.svc,mynamespace -s https://github.com/argoproj/argocd-example-apps.git

Tweaking Project Settings

Need to add or remove source repos? Argo CD has commands for that. Want to play with allow and deny rules? You can do that too, with snippets like this:

spec:
  sourceRepos:
    - '!https://gitlab.com/group/**'
    - '*'

Assigning Applications to Projects

Switching an application to a different project is as simple as:

argocd app set guestbook-default --project myproject

Project Roles: Delegate Like a Boss

Projects have roles for access control. You can create, manage, and assign roles to control who does what in your project.

Go Global: Global Projects in v1.8

From version 1.8 onwards, Argo CD introduced global projects. These are templates that other projects can inherit settings from. Super handy for maintaining consistency!

Self-Service with Project-Scoped Repositories and Clusters

Fancy a bit of self-service? Argo CD allows project members to add their own repositories and clusters to a project. It’s all about empowering teams to manage their own resources.

For the full guide and more detailed instructions, check out the official Argo CD documentation. Happy coding! 💻🌟

Leave a comment