add longhorn app

This commit is contained in:
2026-01-12 04:23:38 +01:00
parent 5334c025c1
commit 2c17121d41
5 changed files with 116 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: longhorn-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 longhorn)
# 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 longhorn
- git:
repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git
revision: main
directories:
- path: "helm/longhorn/*"
# 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: 'longhorn-{{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}}/longhorn/{{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: 'longhorn-{{path.basename}}'
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true

View File

@@ -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"

View File

@@ -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"

Binary file not shown.

View File

@@ -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