Skip to content

Commit 10d5bea

Browse files
committed
up
1 parent 74c4eb4 commit 10d5bea

4 files changed

Lines changed: 11 additions & 111 deletions

File tree

docs/argocd.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ These `AppProject` resources are defined in `infrastructure/argocd/apps/projects
8282
We use **three simple ApplicationSets** that discover applications based on their directory structure. This follows a "convention over configuration" approach, eliminating the need for metadata files, and follows **2025 homelab best practices** with a flattened structure.
8383

8484
### 1. The "Directory as Application" Pattern
85-
Instead of relying on marker files, our `ApplicationSet`s discover applications by looking for directories that match a predefined path pattern. The application's name and target namespace are derived directly from this path. Each `ApplicationSet` is co-located with its applications:
86-
- **Infrastructure:** `infrastructure/*` (defined in `infrastructure/infrastructure-appset.yaml`)
87-
- **Monitoring:** `monitoring/*` (defined in `monitoring/monitoring-appset.yaml`)
88-
- **My Apps:** `my-apps/*/*` (defined in `my-apps/my-apps-appset.yaml`)
85+
Instead of relying on marker files, our `ApplicationSet`s discover applications by looking for directories that match a predefined path pattern. The application's name and target namespace are derived directly from this path. The `ApplicationSet` resources are centrally managed in `infrastructure/argocd/apps/`:
86+
- **Infrastructure:** `infrastructure/*` (defined in `infrastructure/argocd/apps/infrastructure-appset.yaml`)
87+
- **Monitoring:** `monitoring/*` (defined in `infrastructure/argocd/apps/monitoring-appset.yaml`)
88+
- **My Apps:** `my-apps/*/*` (defined in `infrastructure/argocd/apps/my-apps-appset.yaml`)
8989

9090
### 2. ApplicationSet Configuration
91-
Each `ApplicationSet` is **co-located** with its applications, following peer-level organization. Here is the `my-apps-appset.yaml` as an example:
91+
All `ApplicationSet`s are managed by the `root` ArgoCD application and are defined within `infrastructure/argocd/apps/`. Here is the `my-apps-appset.yaml` as an example:
9292

9393
```yaml
9494
apiVersion: argoproj.io/v1alpha1
@@ -140,19 +140,19 @@ The repository structure follows **2025 homelab best practices** with a flattene
140140
├── infrastructure/
141141
│ ├── argocd/ # <-- Manually bootstrapped, NOT in AppSet
142142
│ │ ├── apps/ # <-- ArgoCD's OWN config (Projects/AppSets)
143-
│ │ │ └── ...
143+
│ │ │ ├── infrastructure-appset.yaml
144+
│ │ │ ├── monitoring-appset.yaml
145+
│ │ │ ├── my-apps-appset.yaml
146+
│ │ │ └── projects.yaml
144147
│ │ └── ...
145-
│ ├── infrastructure-appset.yaml # <-- ApplicationSet co-located with apps
146148
│ ├── cert-manager/ # <-- Scanned by infrastructure-appset
147149
│ ├── longhorn/ # <-- Scanned by infrastructure-appset
148150
│ └── ...
149151
├── monitoring/
150-
│ ├── monitoring-appset.yaml # <-- ApplicationSet co-located with apps
151152
│ ├── prometheus-stack/ # <-- Scanned by monitoring-appset
152153
│ ├── loki-stack/ # <-- Scanned by monitoring-appset
153154
│ └── ...
154155
└── my-apps/
155-
├── my-apps-appset.yaml # <-- ApplicationSet co-located with apps
156156
└── development/
157157
└── nginx/ # <-- Scanned by my-apps-appset
158158
└── ...
@@ -163,7 +163,7 @@ The repository structure follows **2025 homelab best practices** with a flattene
163163
1. **Flattened & Self-Managing ArgoCD**:
164164
- ArgoCD's entire configuration lives within `infrastructure/argocd`.
165165
- The `root` application manages the projects and `ApplicationSet`s from its own `apps/` subdirectory.
166-
- **ApplicationSets are co-located with their applications**, following 2025 homelab best practices.
166+
- **ApplicationSets are centrally managed within the ArgoCD configuration**, following 2025 homelab best practices.
167167
- **ArgoCD's configuration is structurally isolated from other infrastructure apps, preventing recursive management loops.**
168168

169169
2. **2025 Homelab Pattern**:
@@ -242,7 +242,7 @@ kubectl describe application my-apps-nginx-development -n argocd
242242
| Issue | Solution |
243243
|-------|----------|
244244
| **ApplicationSet not generating apps** | Verify the directory structure matches the `path` pattern in the `ApplicationSet`. Check the `ApplicationSet` controller logs in the `argocd` namespace. Ensure directories have valid `kustomization.yaml` files. |
245-
| **Recursive loop or Helm error on `infra-argocd`** | This error occurs if the `infrastructure-appset` is configured to scan a path that includes the `infrastructure/argocd` directory. The ApplicationSet excludes `infrastructure/argocd` to prevent this issue. Verify the exclude patterns in `infrastructure/infrastructure-appset.yaml`. |
245+
| **Recursive loop or Helm error on `infra-argocd`** | This error occurs if the `infrastructure-appset` is configured to scan a path that includes the `infrastructure/argocd` directory itself. The `infrastructure-appset.yaml` in `infrastructure/argocd/apps` is configured to prevent this. |
246246
| **Applications stuck in sync** | Review application logs (`argocd app logs <app-name>`) and check for sync errors in the UI. Check if Helm charts require `--enable-helm` flag. |
247247
| **ArgoCD UI not accessible** | Check the `http-route.yaml` and the status of the Gateway API or ingress controller. |
248248
| **Nested kustomization Helm issues** | The 2025 structure flattens nested kustomizations to avoid `--enable-helm` inheritance issues. If you see Helm chart errors, ensure the chart is defined at the ApplicationSet target level, not nested. |

infrastructure/infrastructure-appset.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.

monitoring/monitoring-appset.yaml

Lines changed: 0 additions & 33 deletions
This file was deleted.

my-apps/my-apps-appset.yaml

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)