So far, we have seen about Argo CD applications and CLI with some practical examples. Now lets another interesting feature on Argo CD called, Projects. In this post let’s about Argo CD Projects and how to manage it with example scenarios.
Argo CD Series: https://foxutech.com/category/kubernetes/argocd/
Projects provide a logical grouping of applications, which is useful when Argo CD is used by multiple teams like Devops, application, etc. Projects provide the following features:
By default, argo cd comes with “default” project.
Every application belongs to a single project. If unspecified, an application belongs to the default project, which is created automatically and by default, permits deployments from any source repo, to any cluster, and all resource Kinds. The default project can be modified, but not deleted. When initially created, it’s specification is configured to be the most permissive:
spec: sourceRepos: - '*' destinations: - namespace: '*' server: '*' clusterResourceWhitelist: - group: '*' kind: '*'
Additional projects can be created to give separate teams different levels of access to namespaces.
We can create the argocd applications declaratively, Cli and webUI. The following command creates a new project project-alpha which can deploy applications to namespace mynamespace of cluster https://kubernetes.default.svc. The permitted Git source repository is set to https://github.com/foxutech/kubernetes.git repository.
# argocd proj create project-alpha -d https://kubernetes.default.svc,mynamespace -s https://github.com/foxutech/kubernetes.git
In this post we will be seeing how to manage via Argo CD CLI, for declarative example. Please check on following video:
Permitted source Git repositories are managed using commands:
# argocd proj add-source <PROJECT> <REPO> # argocd proj remove-source <PROJECT> <REPO>
Permitted destination clusters and namespaces are managed with the commands (for clusters always provide server, the name is not used for matching):
# argocd proj add-destination <PROJECT> <CLUSTER>,<NAMESPACE>
# argocd proj remove-destination <PROJECT> <CLUSTER>,<NAMESPACE>
Continue reading on https://foxutech.com/argo-cd-projects-and-examples/
You can follow us on social media, to get some short knowledges regularly.
Join other developers and claim your FAUN account now!
Only registered users can post comments. Please, login or signup.