From 5d593b525395c7c1fc7a5bf750cbb881f1f4d61b Mon Sep 17 00:00:00 2001 From: Nick Adam Date: Thu, 15 Jan 2026 14:33:25 +0100 Subject: [PATCH] feat: add longhorn storage and documentation --- infrastructure/longhorn-app.yaml | 23 +++++++++++++++++++++++ infrastructure/longhorn-config-app.yaml | 20 ++++++++++++++++++++ infrastructure/longhorn/Chart.yaml | 10 ++++++++++ infrastructure/longhorn/values.yaml | 20 ++++++++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 infrastructure/longhorn-app.yaml create mode 100644 infrastructure/longhorn-config-app.yaml create mode 100644 infrastructure/longhorn/Chart.yaml create mode 100644 infrastructure/longhorn/values.yaml diff --git a/infrastructure/longhorn-app.yaml b/infrastructure/longhorn-app.yaml new file mode 100644 index 0000000..79c70a0 --- /dev/null +++ b/infrastructure/longhorn-app.yaml @@ -0,0 +1,23 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: longhorn + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "1" +spec: + project: default + source: + repoURL: https://git.cloud-infra.prod.openmailserver.de/stabify/gitops.git + targetRevision: HEAD + path: infrastructure/longhorn + destination: + server: https://kubernetes.default.svc + namespace: longhorn-system + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + - ServerSideApply=true # Important for CRDs diff --git a/infrastructure/longhorn-config-app.yaml b/infrastructure/longhorn-config-app.yaml new file mode 100644 index 0000000..34a872d --- /dev/null +++ b/infrastructure/longhorn-config-app.yaml @@ -0,0 +1,20 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: longhorn-config + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "2" # Nach Longhorn Install +spec: + project: default + source: + repoURL: https://git.cloud-infra.prod.openmailserver.de/stabify/gitops.git + targetRevision: HEAD + path: infrastructure/longhorn/config + destination: + server: https://kubernetes.default.svc + namespace: longhorn-system + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/infrastructure/longhorn/Chart.yaml b/infrastructure/longhorn/Chart.yaml new file mode 100644 index 0000000..bbffc3d --- /dev/null +++ b/infrastructure/longhorn/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: longhorn-bootstrap +description: Wrapper chart for Longhorn +type: application +version: 1.0.0 +appVersion: "1.0.0" +dependencies: + - name: longhorn + version: 1.6.0 # Nutze eine stabile Version + repository: https://charts.longhorn.io diff --git a/infrastructure/longhorn/values.yaml b/infrastructure/longhorn/values.yaml new file mode 100644 index 0000000..69afe08 --- /dev/null +++ b/infrastructure/longhorn/values.yaml @@ -0,0 +1,20 @@ +longhorn: + persistence: + defaultClass: true + defaultClassReplicaCount: 3 + + defaultSettings: + createDefaultDiskLabeledNodes: true + defaultDataPath: /var/lib/longhorn + # Backup Target (für später mit SeaweedFS) + # backupTarget: s3://longhorn-backups@us-east-1/ + # backupTargetCredentialSecret: longhorn-backup-secret + + ingress: + enabled: true + ingressClassName: traefik + host: longhorn.stabify.de + annotations: + cert-manager.io/cluster-issuer: letsencrypt-production + tls: true + tlsSecret: longhorn-tls