From a9c54864d3d00d566870a74f75e56c1374845aa5 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Mon, 20 May 2024 21:55:59 +0200 Subject: [PATCH] Move Longhorn helm chart to k3s bootstrap --- kubenix-modules/all.nix | 4 ++-- kubenix-modules/base.nix | 17 +++++++++++++++++ kubenix-modules/longhorn.nix | 17 ----------------- machines/atlas.nix | 1 - 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/kubenix-modules/all.nix b/kubenix-modules/all.nix index def89f1..4904128 100644 --- a/kubenix-modules/all.nix +++ b/kubenix-modules/all.nix @@ -18,13 +18,12 @@ let # ./minecraft.nix ./blog.nix ./atticd.nix - ./argo.nix + # ./argo.nix ]; in { imports = [ ./base.nix - ./custom-types.nix ./longhorn.nix ./esrom.nix ./metallb.nix @@ -34,5 +33,6 @@ in ./custom/longhorn-volume.nix ./traefik.nix ./volumes.nix + ./custom-types.nix ] ++ applications; } diff --git a/kubenix-modules/base.nix b/kubenix-modules/base.nix index 7f878d6..677a776 100644 --- a/kubenix-modules/base.nix +++ b/kubenix-modules/base.nix @@ -40,6 +40,23 @@ chart = nixhelm.chartsDerivations.${system}.argoproj.argo-workflows; includeCRDs = true; }; + + longhorn = { + chart = nixhelm.chartsDerivations.${system}.longhorn.longhorn; + includeCRDs = true; + values = { + defaultSettings = { + defaultDataPath = "/mnt/longhorn"; + storageMinimalAvailablePercentage = 0; + allowRecurringJobWhileVolumeDetached = true; + backupTarget = "nfs://lewis.dmz:/mnt/data/nfs/longhorn-backup"; + }; + + persistence = { + defaultClassReplicaCount = 2; + }; + }; + }; }; }; }; diff --git a/kubenix-modules/longhorn.nix b/kubenix-modules/longhorn.nix index e191115..48cb659 100644 --- a/kubenix-modules/longhorn.nix +++ b/kubenix-modules/longhorn.nix @@ -1,23 +1,6 @@ { lib, nixhelm, system, ... }: { config = { kubernetes = { - helm.releases.longhorn = { - chart = nixhelm.chartsDerivations.${system}.longhorn.longhorn; - includeCRDs = true; - values = { - defaultSettings = { - defaultDataPath = "/mnt/longhorn"; - storageMinimalAvailablePercentage = 0; - allowRecurringJobWhileVolumeDetached = true; - backupTarget = "nfs://lewis.dmz:/mnt/data/nfs/longhorn-backup"; - }; - - persistence = { - defaultClassReplicaCount = 2; - }; - }; - }; - resources = { ingresses.longhorn = { metadata.annotations = { diff --git a/machines/atlas.nix b/machines/atlas.nix index cfed93b..48440a3 100644 --- a/machines/atlas.nix +++ b/machines/atlas.nix @@ -9,7 +9,6 @@ k3s = { enable = true; - # role = "server"; serverAddr = "https://jefke.dmz:6443"; }; };