Skip to content

villisco/argocd-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

argocd-setup

This is an EXAMPLE(!) ArgoCD setup, extended with user defined configurations.

Custom configurations:

Kustomize is used to patch the base files over with environment specific configs.
For local testing get the kustomize tool from https://kustomize.io

Linked repositories

Splitting up the repositories provides option to manage permissions separately.

Process flowchart:
argocd

Repository structure

argocd-setup
├── README.md
├── base
│   ├── /apps                         <!--- root admin apps
│   │   ├── apps.yaml                 <!--- creates app named "argocd" (syncs this repo content)
│   │   ├── projects.yaml             <!--- creates app named "projects" (syncs "argocd-projects" repo content)
│   │   └── argocd.yaml               <!--- creates app named "apps" (syncs "argocd-apps" repo content; "app-of-apps")
│   ├── /configmaps                   <!--- configmaps used by "argocd"
│   ├── /secrets                      <!--- repository login secrets used by apps: "argocd, "apps"
│   ├── /services                     <!--- services configured for "argocd"
│   ├── projects                    
│   │   ├── argocd.yaml               <!--- used by apps: "argocd", "apps"
│   │   └── default.yaml              <!--- restricted version of the default project (override)
│   ├── namespace.yaml
│   └── kustomization.yaml
└── overlays                          
    ├── dev                           <!--- patch the base files with "dev" env conf
    │   ├── /apps
    │   ├── /secrets
    │   ├── argocd-cm.yaml
    │   ├── argocd-cmd-params-cm.yaml
    │   ├── argocd-rbac-cm.yaml       <!--- argocd groups available in keycloak
    │   └── kustomization.yaml
    ├── live
    │   ├── ...
    │   └── kustomization.yaml
    └── test
        ├── ...
        └── kustomization.yaml

Initial setup

When ArgoCD has not yet been installed to cluster use kubectl to apply manifests aka install ArgoCD.
This is default ArgoCD install (github.com manifests) + custom user configurations (from this repo).

1. Install ArgoCD + AppProjects (projects needed for root applications)

# Match all labels except "kind=Application"
kustomize build . | kubectl apply -l kind!=Application -f -

PS! ArgoCD default install does not create any Applications - they are all user defined (safe to exclude)!

2. Install the root Applications (argocd,projects,apps)

kustomize build . | kubectl apply -l kind=Application -f -

NB! ArgoCD must be first installed and running before adding the applications (kind: Application) custom resources !