🧠 Bootstrap GitOps#
Mon dépôt homelab-gitops est structuré pour fonctionner avec un point d’entrée unique :
📍 bootstrap/homelab.yaml
Ce fichier est appliqué une seule fois manuellement, et déclenche ensuite automatiquement :
- l’application
apps(définie dansapps.yaml) - qui explore récursivement tous les sous-dossiers d’applications

Architecture Gitops
🗂️ Arborescence réelle#
homelab-gitops/
├── bootstrap/
│ └── homelab.yaml ← ⚙️ point de départ GitOps
├── clusters/
│ └── prod/
│ └── app-of-apps.yaml (Contient toutes mes app visuellement)
├── apps/
│ ├── core/
│ │ ├── cert-manager/
│ │ └── cert-issuer/
│ ├── home-automation/
│ │ └── home-assistant/
│ ├── metallb/
│ ├── networking/
│ │ └── ingress-nginx/
│ ├── observability/
│ │ ├── kube-prom-stack/
│ │ └── loki-stack/
│ ├── storage/
│ │ └── longhorn/
│ └── system/
├── config/
│ └── metallb/
│ ├── ipaddresspool.yaml
│ └── l2advertisement.yaml
📄 bootstrap/homelab.yaml#
more bootstrap/homelab.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: apps
namespace: argocd
spec:
project: default
source:
repoURL: https://gitlab.com/ksh2177/homelab-gitops.git
targetRevision: HEAD
path: apps
directory:
recurse: true
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: true
selfHeal: true
📄 apps/app.yaml (déclenché automatiquement)#
more clusters/prod/app-of-apps.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: homelab
namespace: argocd
spec:
project: default
source:
repoURL: https://gitlab.com/ksh2177/homelab-gitops.git
targetRevision: HEAD
path: bootstrap
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
▶️ Étape manuelle unique#
kubectl apply -f bootstrap/homelab.yaml
Cela crée l’application homelab dans Argo CD, qui elle-même crée apps,
qui explore tout le dossier apps/ en récursif et déploie automatiquement chaque app.yaml.
🔁 Résultat#
Dans Argo CD :
- Tu verras l’application
homelab➜apps➜ toutes les sous-apps déployées - Chaque app est traçable, synchronisée, et versionnée via Git

Argo Apps
🎯 Tu as maintenant un véritable système GitOps en cascade, automatisé, modulaire et auto-réparateur 💡
