diff --git a/apps/applicationset-longhorn.yaml b/apps/applicationset-longhorn.yaml.disable similarity index 100% rename from apps/applicationset-longhorn.yaml rename to apps/applicationset-longhorn.yaml.disable diff --git a/apps/applicationset-metallb.yaml b/apps/applicationset-metallb.yaml new file mode 100644 index 0000000..da27366 --- /dev/null +++ b/apps/applicationset-metallb.yaml @@ -0,0 +1,55 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: metallb-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 metallb) + # 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 metallb + - git: + repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git + revision: main + directories: + - path: "helm/metallb/*" + # 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: 'metallb-{{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}}/metallb/{{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: 'metallb-{{path.basename}}' + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true \ No newline at end of file diff --git a/apps/applicationset-traefik.yaml b/apps/applicationset-traefik.yaml new file mode 100644 index 0000000..c75e643 --- /dev/null +++ b/apps/applicationset-traefik.yaml @@ -0,0 +1,55 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: traefik-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 traefik) + # 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 traefik + - git: + repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git + revision: main + directories: + - path: "helm/traefik/*" + # 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: 'traefik-{{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}}/traefik/{{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: 'traefik-{{path.basename}}' + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true \ No newline at end of file diff --git a/helm/metallb/dev/Chart.yaml b/helm/metallb/dev/Chart.yaml new file mode 100644 index 0000000..18e96f8 --- /dev/null +++ b/helm/metallb/dev/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: metallb-wrapper +description: Wrapper pour metallb - Environnement DEV +type: application +version: 1.0.0 + +dependencies: + - name: metallb + version: 0.15.3 # 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/metallb/dev/templates/config.yaml b/helm/metallb/dev/templates/config.yaml new file mode 100644 index 0000000..24acdd5 --- /dev/null +++ b/helm/metallb/dev/templates/config.yaml @@ -0,0 +1,17 @@ +apiVersion: metallb.io/v1beta1 +kind: IPAddressPool +metadata: + name: default + namespace: {{ .Release.Namespace }} +spec: + addresses: + - 10.78.106.240-10.78.106.245 +--- +apiVersion: metallb.io/v1beta1 +kind: L2Advertisement +metadata: + name: l2-default + namespace: {{ .Release.Namespace }} +spec: + ipAddressPools: + - default diff --git a/helm/metallb/dev/values.yaml b/helm/metallb/dev/values.yaml new file mode 100644 index 0000000..a580def --- /dev/null +++ b/helm/metallb/dev/values.yaml @@ -0,0 +1,20 @@ +# Toutes les configurations destinées au chart Nextcloud +# doivent être indentées sous la clé 'nextcloud' +metallb: + controller: + enabled: true + image: + repository: harbor.gkdomaine.local/images/metallb-controller + tag: v0.15.3 + pullPolicy: IfNotPresent + speaker: + enabled: true + image: + repository: harbor.gkdomaine.local/images/metallb-speaker + tag: v0.15.3 + pullPolicy: IfNotPresent + frr: + enabled: true + image: + repository: harbor.gkdomaine.local/images/frr + tag: 10.4.1 \ No newline at end of file diff --git a/helm/traefik/dev/Chart.lock b/helm/traefik/dev/Chart.lock new file mode 100644 index 0000000..9f3c37c --- /dev/null +++ b/helm/traefik/dev/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: longhorn + repository: oci://harbor.gkdomaine.local/charts + version: 1.10.1 +digest: sha256:9abe842963b34cba5f3787caa4470d921fe074ffe8f6387f43a398babc93d29d +generated: "2026-01-12T04:23:19.8152207+01:00" diff --git a/helm/traefik/dev/Chart.yaml b/helm/traefik/dev/Chart.yaml new file mode 100644 index 0000000..2b2c89f --- /dev/null +++ b/helm/traefik/dev/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: longhorn-wrapper +description: Wrapper pour longhorn - Environnement DEV +type: application +version: 1.0.0 + +dependencies: + - name: longhorn + version: 1.10.1 # 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/traefik/dev/charts/longhorn-1.10.1.tgz b/helm/traefik/dev/charts/longhorn-1.10.1.tgz new file mode 100644 index 0000000..217f3f2 Binary files /dev/null and b/helm/traefik/dev/charts/longhorn-1.10.1.tgz differ diff --git a/helm/traefik/dev/values.yaml b/helm/traefik/dev/values.yaml new file mode 100644 index 0000000..38497f4 --- /dev/null +++ b/helm/traefik/dev/values.yaml @@ -0,0 +1,44 @@ +# Toutes les configurations destinées au chart Nextcloud +# doivent être indentées sous la clé 'nextcloud' +longhorn: + ui: + enabled: true + + # Persistence + defaultSettings: + defaultDataPath: /var/lib/longhorn + defaultReplicaCount: 3 + defaultDiskSelector: "" + defaultDataLocality: "best-effort" + + # RBAC et service accounts (Helm gère par défaut) + rbac: + create: true + + # Installer CRDs si pas déjà faits + installCRDs: true + + image: + longhorn: + manager: + # -- Registry for the Longhorn Manager image. + registry: "harbor.gkdomaine.local" + # -- Repository for the Longhorn Manager image. + repository: images/longhorn-manager + # -- Tag for the Longhorn Manager image. + tag: v1.10.1 + ui: + # -- Registry for the Longhorn UI image. + registry: "harbor.gkdomaine.local" + # -- Repository for the Longhorn UI image. + repository: images/longhorn-ui + # -- Tag for the Longhorn UI image. + tag: v1.10.1 + shareManager: + # -- Registry for the Longhorn Share Manager image. + registry: "harbor.gkdomaine.local" + # -- Repository for the Longhorn Share Manager image. + repository: images/longhorn-share-manager + # -- Tag for the Longhorn Share Manager image. + tag: v1.10.1 + \ No newline at end of file