From 0e3d07d72079cd5e29fb9d287833d5ba9485e01d Mon Sep 17 00:00:00 2001 From: James Allenby Date: Wed, 1 Jul 2026 19:35:06 +0100 Subject: [PATCH] feat: bootstrap ArgoCD with app-of-apps pattern --- apps/argo-cd.yaml | 33 +++++++++++++++++++++++++++++++++ apps/root.yaml | 18 ++++++++++++++++++ environments/default.yaml | 7 +++++++ helmfile.yaml | 16 ++++++++++++++++ values/.gitkeep | 0 values/argo-cd.yaml | 18 ++++++++++++++++++ 6 files changed, 92 insertions(+) create mode 100644 apps/argo-cd.yaml create mode 100644 apps/root.yaml create mode 100644 environments/default.yaml create mode 100644 helmfile.yaml create mode 100644 values/.gitkeep create mode 100644 values/argo-cd.yaml diff --git a/apps/argo-cd.yaml b/apps/argo-cd.yaml new file mode 100644 index 0000000..a97687f --- /dev/null +++ b/apps/argo-cd.yaml @@ -0,0 +1,33 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: argo-cd + namespace: argo-cd +spec: + project: default + source: + repoURL: oci://ghcr.io/argoproj/argo-helm/argo-cd + targetRevision: 9.2.3 + helm: + valuesObject: + redis-ha: + enabled: true + controller: + replicas: 1 + server: + autoscaling: + enabled: true + minReplicas: 2 + repoServer: + autoscaling: + enabled: true + minReplicas: 2 + applicationSet: + replicas: 2 + destination: + server: https://kubernetes.default.svc + namespace: argo-cd + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/apps/root.yaml b/apps/root.yaml new file mode 100644 index 0000000..6522f84 --- /dev/null +++ b/apps/root.yaml @@ -0,0 +1,18 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: root + namespace: argo-cd +spec: + project: default + source: + repoURL: git@git.jrdn.dev:JamesAllenby/homelab-platform.git + targetRevision: main + path: apps + destination: + server: https://kubernetes.default.svc + namespace: argo-cd + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/environments/default.yaml b/environments/default.yaml new file mode 100644 index 0000000..5543b75 --- /dev/null +++ b/environments/default.yaml @@ -0,0 +1,7 @@ +# Default environment values +# These values are available in helmfile.yaml as {{ .Values }} +# Example: +# replicaCount: 1 +# image: +# repository: nginx +# tag: latest diff --git a/helmfile.yaml b/helmfile.yaml new file mode 100644 index 0000000..b2d07db --- /dev/null +++ b/helmfile.yaml @@ -0,0 +1,16 @@ +helmDefaults: + createNamespace: true + wait: true + timeout: 300 + +releases: + - name: argo-cd + namespace: argo-cd + chart: oci://ghcr.io/argoproj/argo-helm/argo-cd + version: 9.2.3 + values: + - values/argo-cd.yaml + hooks: + - events: ["postsync"] + command: kubectl + args: ["apply", "-f", "apps/root.yaml"] diff --git a/values/.gitkeep b/values/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/values/argo-cd.yaml b/values/argo-cd.yaml new file mode 100644 index 0000000..f678904 --- /dev/null +++ b/values/argo-cd.yaml @@ -0,0 +1,18 @@ +redis-ha: + enabled: true + +controller: + replicas: 1 + +server: + autoscaling: + enabled: true + minReplicas: 2 + +repoServer: + autoscaling: + enabled: true + minReplicas: 2 + +applicationSet: + replicas: 2