Skip to content

andersondario/argocd-gitops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArgoCD Self Managed

Please check my article first: https://medium.com/@andersondario/argocd-app-of-apps-a-gitops-approach-52b17a919a66

How to install

  1. Create a file called argocd-install/values-gke.yaml based on argocd-install/values-gke.example.yaml.
  2. Execute the following commands.
# If Minikube, start your cluster
minikube start

# If GKE, get the cluster credentials
gcloud container clusters get-credentials YOUR_CLUSTER_NAME --region YOUR_CLUSTER_REGION --project YOUR_GCP_PROJECT_ID

# Go to argocd-install folder
cd argocd-install

# If GKE, put your cert into keys
mkdir keys

# Create Namespaces
kubectl create ns argocd
kubectl create namespace ingress-nginx

## Deploy Secrets
kubectl -n argocd create secret tls argocd-server-tls --cert keys/tls.crt --key keys/tls.key

## If Google SSO
kubectl -n argocd create secret generic  argocd-google-groups-json --from-file=keys/googleAuth.json


# If GKE, Install Ingress, if minikube, ignore.
helm install -n ingress-nginx argocd-ingress-nginx ./ingress-nginx --set "controller.extraArgs.enable-ssl-passthrough=" --set controller.admissionWebhooks.enabled=false

# Install Argo
helm install -n argocd argocd ./argo-cd -f values-<YOUR_FILE>.yaml 

Post Installation

  1. If GKE, Get the ingress IP and add a DNS entry for that.
    If minikube, expose through port forwarding:
kubectl port-forward svc/argocd-server -n argocd 8080:443
  1. Add the Git Repository by CLI or use the Web Interface
UI user: admin
UI pass: kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

repo https: YOUR_HTTP_REPO_URL
username: YOUR_USERNAME
password: YOUR_PASS OR PERSONAL ACCESS TOKEN
  1. Create the core apps
kubectl apply -f argocd-core-projects.yaml
kubectl apply -f argocd-core-applications.yaml

How to Use

  1. Define your ApplicationSet or Application in argocd-apps folder.
  2. Define the AppProject for your applications with the right permissions in argocd-appprojects or edit a existing one with the cluster and namespaces allowed.
  3. Create a repository to store your charts inside the DevOps/GitOps or other Group. Folder Structure Suggestion:
.
└── my-application/
    ├── chart/
    ├── configs/ (optional)
    ├── values-override.yaml
    └── values-<any>.yaml (optional)
  1. Add your application repository in ArgoCD.

Troubleshooting:

  1. SSO doesn't work: Restart the DEX Server Deployment