Deploy ArgoCD¶
Requirements¶
Configure OIDC¶
Follow either Azure or Google documentation
Configure Helm files¶
sed -i "s/AzureADClientSecret/$(argoCdAadClientSecret)/g" Minority/Canary/ArgoCD/ArgoCD-Server/values.yaml
Edit in values.yaml:
configs:
secret:
extra:
oidc.azure.clientSecret: xxx
server:
ingress:
...
hostname: argocd.minority.com
Edit in dev-values.yaml:
global:
domain: dev-argocd.minority.com
server:
ingress:
hostname: dev-argocd.minority.com
configs:
cm:
url: https://dev-argocd.minority.com/
Deploy Argo CD server Helm chart¶
helm repo add argo https://argoproj.github.io/argo-helm --force-update
helm upgrade --install \
minority-argocd argo/argo-cd \
--namespace argocd \
--version v7.5.2 \
-f values.yaml -f dev-values.yaml
Minority/Canary/ArgoCD/ArgoCD-Server
Creating Applications in ArgoCD¶
ArgoCD applications are declarative manifests that define the desired state of your Kubernetes resources. ArgoCD automatically reconciles the actual state of your Kubernetes resources with the desired state specified in the application manifests.
App of Apps Pattern in ArgoCD
The app of apps pattern in ArgoCD is a technique for managing a group of applications as a single application.
The app of apps pattern offers a powerful approach to managing complex applications in ArgoCD. It simplifies the deployment process and facilitates the management of applications as a whole.
Creating an App of Apps Using kubectl apply¶
The rootapp should be created either via a pipeline or using the kubectl apply command using the manifest file, follow these steps:
- Ensure
kubectlis installed and configured to access your Kubernetes cluster. - Navigate to the directory containing the app of apps manifest you want to apply.
- Execute the following command, replacing
rootapp-applications-dev.yamlwith the actual manifest filename:
## rootapp for applications in dev environment
kubectl apply -n argocd -f rootapp-applications-dev.yaml
This command will create an app of apps named rootapp-applications that deploys the applications defined in applications.yaml template with user defined values in Applications/values.yaml file.
Creating Projects in ArgoCD¶
ArgoCD projects allow you to group applications together and control which namespaces they can be deployed to. Projects also enable defining RBAC policies for applications.
Creating a Project Using kubectl apply¶
To create a project using the kubectl apply command, follow these steps:
- Ensure
kubectlis installed and configured to access your Kubernetes cluster. - Navigate to the directory containing the project manifest you want to apply.
- Execute the following command, use
rootapp-projects.yamlyaml manifest present inProjectsdirectory
## rootapp for Projects in dev environment
kubectl apply -n argocd -f rootapp-projects.yaml