diff --git a/README.md b/README.md index 2dd8187..bee0571 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ cd headlamp/dev Connexion au registre Harbor ``` -helm registry login harbor.example.com --username admin --insecure +helm registry login harbor.gkdomaine.local --username admin --insecure ``` Téléchargement des dépendances diff --git a/apps/applicationset-homarr.yaml b/apps/applicationset-homarr.yaml new file mode 100644 index 0000000..e69d1b5 --- /dev/null +++ b/apps/applicationset-homarr.yaml @@ -0,0 +1,55 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: homarr-apps + namespace: argocd-ops +spec: + generators: + # Utilise un générateur merge pour combiner : + # 1. Les répertoires Helm existants (détermine quels environnements sont disponibles pour homarr) + # 2. Les fichiers de config partagés (pour obtenir name et server) + - merge: + generators: + # Premier générateur : scanne uniquement les répertoires Helm qui existent pour homarr + - git: + repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git + revision: main + directories: + - path: "helm/homarr/*" + # Deuxième générateur : lit les fichiers de config partagés + # ApplicationSet utilisera seulement les fichiers config.json dont le basename + # correspond à un répertoire Helm trouvé + - git: + repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git + revision: main + files: + - path: "configs/*/config.json" + mergeKeys: + - path.basename + template: + metadata: + # Utilise path.basename qui vient du générateur git (plus fiable que environment du JSON) + name: 'homarr-{{path.basename}}' + spec: + # Utilise path.basename pour le projet (ou {{environment}} si disponible dans le JSON) + project: '{{path.basename}}' + source: + repoURL: '{{repository}}' + targetRevision: '{{targetRevision}}' + # Construit explicitement le chemin Helm à partir du basename + path: '{{helmPath}}/homarr/{{path.basename}}' + helm: + valueFiles: + - values.yaml + destination: + # Les variables {{name}} et {{server}} viennent du fichier config.json + # (deuxième générateur du merge) + name: '{{name}}' + # server: '{{server}}' + namespace: 'homarr-{{path.basename}}' + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true \ No newline at end of file diff --git a/helm/homarr/dev/Chart.lock b/helm/homarr/dev/Chart.lock new file mode 100644 index 0000000..5f21f30 --- /dev/null +++ b/helm/homarr/dev/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: homarr + repository: oci://harbor.gkdomaine.local/charts + version: 8.9.0 +digest: sha256:b6a51de0f481cf50bc40f851412469481c31ca498ad3b463260fde4d5363359e +generated: "2026-01-12T00:49:29.2668062+01:00" diff --git a/helm/homarr/dev/Chart.yaml b/helm/homarr/dev/Chart.yaml new file mode 100644 index 0000000..19da788 --- /dev/null +++ b/helm/homarr/dev/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: Homarr-wrapper +description: Wrapper pour Homarr - Environnement DEV +type: application +version: 1.0.0 + +dependencies: + - name: homarr + version: 8.9.0 # Assurez-vous que cette version correspond à celle poussée sur Harbor + # Utilisation de votre registre Harbor interne (OCI) + repository: "oci://harbor.gkdomaine.local/charts" \ No newline at end of file diff --git a/helm/homarr/dev/charts/homarr-8.9.0.tgz b/helm/homarr/dev/charts/homarr-8.9.0.tgz new file mode 100644 index 0000000..cfb5b7c Binary files /dev/null and b/helm/homarr/dev/charts/homarr-8.9.0.tgz differ diff --git a/helm/homarr/dev/values.yaml b/helm/homarr/dev/values.yaml new file mode 100644 index 0000000..0f62e1a --- /dev/null +++ b/helm/homarr/dev/values.yaml @@ -0,0 +1,18 @@ +# Toutes les configurations destinées au chart Nextcloud +# doivent être indentées sous la clé 'nextcloud' +homarr: + replicaCount: 1 + + image: + registry: harbor.gkdomaine.local + repository: images/homarr + tag: "v1.50.0" + pullPolicy: IfNotPresent + + ingress: + enabled: true + + hosts: + - host: homarr.gkdomaine.local + paths: + - path: / \ No newline at end of file