You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the CRDs in place, we can now bootstrap Argo CD. This is a two-step process.
139
+
### 6. Install ArgoCD & All Apps
140
+
With the CRDs in place, we can bootstrap Argo CD and deploy the entire cluster with a single command.
163
141
164
-
**First, we deploy Argo CD itself.**This `Application` manifest tells Argo CD how to manage its own installation and upgrades directly from this Git repository. This is the "app of apps" pattern.
142
+
This `Application` manifest tells Argo CD how to manage its own installation. Once running, Argo CD will automatically sync the `root-appset.yaml` located in the `infrastructure` directory. This `ApplicationSet` will then discover and deploy every other component and application in the repository.
165
143
166
144
```bash
167
-
# Apply the Argo CD application. It will self-manage from this point on.
145
+
# Apply the Argo CD application. It will self-manage and deploy everything else.
168
146
kubectl apply -f infrastructure/argocd-app.yaml
169
147
```
170
148
171
-
**Second, we deploy the root ApplicationSet.** This `ApplicationSet` automatically discovers and deploys all the other ApplicationSets in this repository (for infrastructure, monitoring, etc.), creating a fully GitOps-driven deployment.
172
-
173
-
```bash
174
-
# Apply the root ApplicationSet. This will deploy everything else.
175
-
kubectl apply -f infrastructure/root-appset.yaml
176
-
```
177
-
178
149
From this point on, every component of your cluster is managed via Git. Any changes pushed to the `main` branch will be automatically synced by Argo CD.
179
150
180
151
### 7. Configure Secret Management
@@ -283,18 +254,16 @@ While this setup uses a single node, you can add worker nodes for additional com
283
254
│ │ └── argocd/ # ArgoCD configuration and projects
284
255
│ ├── networking/ # Network configurations
285
256
│ ├── storage/ # Storage configurations
286
-
│ └── infrastructure-components-appset.yaml # Main infrastructure ApplicationSet
257
+
│ └── root-appset.yaml # Main infrastructure ApplicationSet
Copy file name to clipboardExpand all lines: docs/argocd.md
+58-61Lines changed: 58 additions & 61 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,53 +2,62 @@
2
2
3
3
This guide details the setup and configuration of ArgoCD, which serves as the GitOps engine for our **Talos-based Kubernetes cluster**.
4
4
5
-
## 📋 Overview
5
+
## 📋 Overview & Deployment Flow
6
6
7
-
```mermaid
8
-
graph TD
9
-
A[Talos Cluster] -->|Install| B[ArgoCD]
10
-
B -->|Create| C[AppProjects]
11
-
C -->|Deploy| D[ApplicationSets]
12
-
D -->|Generate| E[Applications]
13
-
E -->|Sync| F[Resources]
14
-
subgraph "Three-Tier Architecture"
15
-
G[Infrastructure Tier]
16
-
H[Monitoring Tier]
17
-
I[Applications Tier]
18
-
end
19
-
D --> G
20
-
D --> H
21
-
D --> I
22
-
```
7
+
The cluster's GitOps process is managed by a single, root `ApplicationSet` that implements the **App of Apps** pattern. This `ApplicationSet` is responsible for discovering and managing all other applications, including infrastructure, monitoring, and user-facing apps. This centralized approach simplifies management and ensures the entire cluster state is declared in one place.
23
8
24
-
## 🔄 Deployment Flow
9
+
The new deployment flow is as follows:
25
10
26
11
```mermaid
27
-
sequenceDiagram
28
-
participant User
29
-
participant Cluster
30
-
participant ArgoCD
31
-
32
-
User->>Cluster: 1. Apply Self-Managed ArgoCD App
33
-
Note over User,Cluster: kubectl apply -f infrastructure/argocd-app.yaml
34
-
Cluster->>ArgoCD: Creates ArgoCD Application
35
-
ArgoCD->>ArgoCD: Self-manages and installs/upgrades itself
The entire cluster bootstrap process is now handled by a two-step apply process. These are the only manual commands needed after setting up Talos and the base kubeconfig.
60
+
The entire cluster bootstrap process is now handled by a single `Application` manifest. This is the only manual command needed after setting up Talos and the base kubeconfig.
52
61
53
62
### 1. Install Gateway API CRDs
54
63
This is a prerequisite for Cilium's Gateway API integration.
### 2. Bootstrap Argo CD and Deploy All Applications
61
-
First, deploy the self-managing Argo CD `Application`. This uses the "app of apps" pattern to make Argo CD manage its own installation and upgrades.
62
-
63
-
```bash
64
-
# Apply the Argo CD application. It will self-manage from this point on.
65
-
kubectl apply -f infrastructure/argocd-app.yaml
66
-
```
69
+
### 2. Bootstrap Argo CD and Deploy Everything
70
+
Deploy the self-managing Argo CD `Application`. This uses the "app of apps" pattern to make Argo CD manage its own installation and upgrades. The `Application` points to the `infrastructure/controllers/argocd` directory, which contains the Argo CD Helm chart configuration.
67
71
68
-
Second, deploy the `root-appset`. This single `ApplicationSet` discovers all other `ApplicationSet` manifests in the repository and deploys them automatically, respecting their defined sync waves.
72
+
Once Argo CD is running, it will automatically sync the `root-appset.yaml` from the `infrastructure` directory, which will then discover and deploy all other applications.
69
73
70
74
```bash
71
-
# Apply the root ApplicationSet. This will deploy everything else.
72
-
kubectl apply -f infrastructure/root-appset.yaml
75
+
# Apply the Argo CD application. It will self-manage and deploy everything else from this point on.
76
+
kubectl apply -f infrastructure/argocd-app.yaml
73
77
```
74
-
75
-
After these two commands, the entire cluster state is managed via Git. No further `kubectl apply` commands are needed for deployment.
78
+
After this command, the entire cluster state is managed via Git. No further `kubectl apply` commands are needed for deployment.
76
79
77
80
## 🔧 Project Setup
78
81
79
-
ArgoCD projects define permissions and boundaries for applications. Our cluster uses four main projects:
82
+
ArgoCD projects define permissions and boundaries for applications. Our cluster uses three main projects, which are automatically assigned by the root `ApplicationSet`:
80
83
81
84
-**infrastructure**: Cilium, Longhorn, Cert-Manager, External Secrets, etc.
82
85
-**monitoring**: Prometheus, Grafana, Loki, Alertmanager, etc.
83
-
-**applications**: User workloads (media, AI, dev, privacy, etc.)
84
-
-**ai**: Specialized AI/ML workloads
86
+
-**my-apps**: All user workloads (media, AI, dev, privacy, etc.)
85
87
86
-
These `AppProject` resources are defined in `infrastructure/controllers/argocd/projects.yaml` and are deployed automatically as part of the main `argocd` application.
88
+
These `AppProject` resources are defined in `infrastructure/projects.yaml` and are deployed automatically as part of the `infrastructure-controllers-argocd` application.
87
89
88
90
## 📱 ApplicationSet Management
89
91
90
-
We use three main ApplicationSets to manage our deployments, which are discovered and applied automatically by the `root-appset`.
91
-
92
-
### 1. Infrastructure ApplicationSet
93
-
Located at `infrastructure/infrastructure-components-appset.yaml`, this ApplicationSet manages infrastructure components like Cilium, Longhorn, Cert-Manager, and other core services. **All storage (Longhorn, local PVs, StorageClasses) is managed declaratively here.**
92
+
Management is now centralized in a single root `ApplicationSet` located at `infrastructure/root-appset.yaml`.
94
93
95
-
### 2. Monitoring ApplicationSet
96
-
Located at `monitoring/monitoring-components-appset.yaml`, this ApplicationSet manages monitoring components like Prometheus, Grafana, Loki, and other observability tools.
94
+
This `ApplicationSet` uses a `directories` generator to scan the repository for all individual application and component directories. For each directory found, it generates a unique Argo CD `Application` resource with the correct settings, including the `kustomize-build-with-helm` plugin to handle any combination of manifests.
97
95
98
-
### 3. Applications ApplicationSet
99
-
Located at `my-apps/myapplications-appset.yaml`, this ApplicationSet manages user applications like media servers, AI applications, and other user-facing services.
96
+
This new model eliminates nested `ApplicationSet` resources and provides a flat, easy-to-understand list of applications in the Argo CD UI.
0 commit comments