From b1a5bf1d962853b3bae4a814aa136f83a3c2c16b Mon Sep 17 00:00:00 2001 From: Daniel Cosme Date: Fri, 1 May 2026 18:47:52 -0400 Subject: [PATCH] Add longhorn --- infrastructure/hydra/kustomization.yaml | 1 + infrastructure/hydra/longhorn/kustomization.yaml | 9 +++++++++ .../hydra/monitoring/kustomization.yaml | 2 +- .../hydra/truenas-csi/kustomization.yaml | 2 +- pkg/longhorn/longhorn.go | 15 +++++++++------ 5 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 infrastructure/hydra/longhorn/kustomization.yaml diff --git a/infrastructure/hydra/kustomization.yaml b/infrastructure/hydra/kustomization.yaml index 5504fdb..e528fcd 100644 --- a/infrastructure/hydra/kustomization.yaml +++ b/infrastructure/hydra/kustomization.yaml @@ -5,3 +5,4 @@ resources: - truenas-csi/ - truenas-csi-driver.yaml - monitoring/ + - longhorn/ diff --git a/infrastructure/hydra/longhorn/kustomization.yaml b/infrastructure/hydra/longhorn/kustomization.yaml new file mode 100644 index 0000000..b4b7f31 --- /dev/null +++ b/infrastructure/hydra/longhorn/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +metadata: + name: longhorn + namespace: longhorn-system +resources: +- namespace.yaml +- longhorn-stack.yaml +- release.yaml diff --git a/infrastructure/hydra/monitoring/kustomization.yaml b/infrastructure/hydra/monitoring/kustomization.yaml index e6f7beb..f7b18cc 100644 --- a/infrastructure/hydra/monitoring/kustomization.yaml +++ b/infrastructure/hydra/monitoring/kustomization.yaml @@ -4,6 +4,6 @@ metadata: name: monitoring namespace: monitoring resources: +- namespace.yaml - kube-prometheus-stack.yaml - release.yaml -- namespace.yaml diff --git a/infrastructure/hydra/truenas-csi/kustomization.yaml b/infrastructure/hydra/truenas-csi/kustomization.yaml index 3616ec0..c976dc5 100644 --- a/infrastructure/hydra/truenas-csi/kustomization.yaml +++ b/infrastructure/hydra/truenas-csi/kustomization.yaml @@ -4,7 +4,7 @@ metadata: name: truenas-csi namespace: truenas-csi resources: +- nfs-storage-class.yaml - iscsi-storage-class.yaml - namespace.yaml - config.yaml -- nfs-storage-class.yaml diff --git a/pkg/longhorn/longhorn.go b/pkg/longhorn/longhorn.go index 1d0ccf0..64b60c2 100644 --- a/pkg/longhorn/longhorn.go +++ b/pkg/longhorn/longhorn.go @@ -20,12 +20,15 @@ func init() { } func Stack() stack.Stack { - s := stack.NewStack("longhorn", map[string]any{ - "namespace": Namespace, - "longhorn-stack": LonghornHelmSource(), - "release": LonghornHelmRelease(), - }) - return s + kz := kube.NewKuztomizedStack( + meta, + map[string]any{ + "namespace": Namespace, + "longhorn-stack": LonghornHelmSource(), + "release": LonghornHelmRelease(), + }, + ) + return kz.Stack("longhorn") } func LonghornHelmSource() source.HelmRepository {