GitOps¶
Constellations IaC repository uses the Apps-of-Apps Pattern for Cluster bootstrapping by applying a root ArgoCD app that then syncs all other Apps:
# applications/root-argocd-app.yml
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: root-app
namespace: argocd
spec:
generators:
- clusters:
selector:
matchLabels:
argocd.argoproj.io/secret-type: cluster
template:
metadata:
name: root-argocd-{{metadata.annotations.cluster_name}}
spec:
project: default
source:
repoURL: https://github.com/clear-route/constellation-iac.git
targetRevision: dev
path: "applications/argocd/{{metadata.annotations.cluster_name}}"
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: true
selfHeal: true
Directory Structure¶
> cd applications
> tree -d
.
├── argocd # argocd apps
│ ├── dev
│ ├── prod
│ └── sandbox
├── external # internet facing apps
│ └── <app-name> # application directory
│ ├── base # base manifests
│ └── overlays # kustomize overlays
│ └── sandbox # sandbox overlays
│ └── dev # dev overlays
│ └── prod # prod overlays
├── internal # Clearroute internal facing apps
│ ├── <app-name> # application directory
│ ├── base # base manifests
│ └── overlays # kustomize overlays
│ └── sandbox # sandbox overlays
│ └── dev # dev overlays
│ └── prod # prod overlays
├── management # management applications, that are needed to operate cluster and run applications
│ ├── cert-manager # helm values and manifests for cert-manager
│ ├── cluster-autoscaler
│ ├── external-dns
│ ├── external-secrets
│ ├── kube-prometheus-stack
│ └── traefik
ArgoCD¶
argocd CLI¶
Tip
Download the ArgoCD CLI from here
Run the following command to authenticate to Constellation using the argo CLI:
Webterminal¶
Note
This might not work in the Safari.
On dev and sandbox the Web-based Terminal is enabled, which allows you to run arbitrary commands in any container, which is especially useful for troubleshooting:
