From 19550818fd26be96ce9887267a4aec2cc125e840 Mon Sep 17 00:00:00 2001 From: Joe Monk Date: Mon, 5 Aug 2024 21:32:20 +0100 Subject: [PATCH] Revert "Remove longhorn" This reverts commit 183b38436623b830b88e8e889ec9d9f23bb67d88. --- clusters/kairos/longhorn/helmrelease.yaml | 16 ++++++++++++++++ clusters/kairos/longhorn/helmrepo.yaml | 8 ++++++++ clusters/kairos/longhorn/ingress.yaml | 16 ++++++++++++++++ clusters/kairos/longhorn/kustomization.yaml | 8 ++++++++ clusters/kairos/longhorn/namespace.yaml | 4 ++++ 5 files changed, 52 insertions(+) create mode 100644 clusters/kairos/longhorn/helmrelease.yaml create mode 100644 clusters/kairos/longhorn/helmrepo.yaml create mode 100644 clusters/kairos/longhorn/ingress.yaml create mode 100644 clusters/kairos/longhorn/kustomization.yaml create mode 100644 clusters/kairos/longhorn/namespace.yaml diff --git a/clusters/kairos/longhorn/helmrelease.yaml b/clusters/kairos/longhorn/helmrelease.yaml new file mode 100644 index 0000000..68548d3 --- /dev/null +++ b/clusters/kairos/longhorn/helmrelease.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: longhorn +spec: + chart: + spec: + chart: longhorn + reconcileStrategy: ChartVersion + sourceRef: + kind: HelmRepository + name: longhorn-repo + version: 1.6.2 + interval: 1m0s + targetNamespace: longhorn-system \ No newline at end of file diff --git a/clusters/kairos/longhorn/helmrepo.yaml b/clusters/kairos/longhorn/helmrepo.yaml new file mode 100644 index 0000000..8bb32de --- /dev/null +++ b/clusters/kairos/longhorn/helmrepo.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: longhorn-repo +spec: + interval: 1m0s + url: https://charts.longhorn.io diff --git a/clusters/kairos/longhorn/ingress.yaml b/clusters/kairos/longhorn/ingress.yaml new file mode 100644 index 0000000..1020ccd --- /dev/null +++ b/clusters/kairos/longhorn/ingress.yaml @@ -0,0 +1,16 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: longhorn +spec: + entryPoints: + - web + routes: + - match: Host(`longhorn.k3s`) + kind: Rule + services: + - name: longhorn-frontend + namespace: longhorn-system + nativeLB: true + kind: Service + port: 80 \ No newline at end of file diff --git a/clusters/kairos/longhorn/kustomization.yaml b/clusters/kairos/longhorn/kustomization.yaml new file mode 100644 index 0000000..96e2484 --- /dev/null +++ b/clusters/kairos/longhorn/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: longhorn-system +resources: +- namespace.yaml +- helmrepo.yaml +- helmrelease.yaml +- ingress.yaml diff --git a/clusters/kairos/longhorn/namespace.yaml b/clusters/kairos/longhorn/namespace.yaml new file mode 100644 index 0000000..2bb0005 --- /dev/null +++ b/clusters/kairos/longhorn/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: longhorn-system \ No newline at end of file