Move Longhorn helm chart to k3s bootstrap

This commit is contained in:
Pim Kunis 2024-05-20 21:55:59 +02:00
parent 5f14df28d5
commit a9c54864d3
4 changed files with 19 additions and 20 deletions

View file

@ -18,13 +18,12 @@ let
# ./minecraft.nix # ./minecraft.nix
./blog.nix ./blog.nix
./atticd.nix ./atticd.nix
./argo.nix # ./argo.nix
]; ];
in in
{ {
imports = [ imports = [
./base.nix ./base.nix
./custom-types.nix
./longhorn.nix ./longhorn.nix
./esrom.nix ./esrom.nix
./metallb.nix ./metallb.nix
@ -34,5 +33,6 @@ in
./custom/longhorn-volume.nix ./custom/longhorn-volume.nix
./traefik.nix ./traefik.nix
./volumes.nix ./volumes.nix
./custom-types.nix
] ++ applications; ] ++ applications;
} }

View file

@ -40,6 +40,23 @@
chart = nixhelm.chartsDerivations.${system}.argoproj.argo-workflows; chart = nixhelm.chartsDerivations.${system}.argoproj.argo-workflows;
includeCRDs = true; 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;
};
};
};
}; };
}; };
}; };

View file

@ -1,23 +1,6 @@
{ lib, nixhelm, system, ... }: { { lib, nixhelm, system, ... }: {
config = { config = {
kubernetes = { 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 = { resources = {
ingresses.longhorn = { ingresses.longhorn = {
metadata.annotations = { metadata.annotations = {

View file

@ -9,7 +9,6 @@
k3s = { k3s = {
enable = true; enable = true;
# role = "server";
serverAddr = "https://jefke.dmz:6443"; serverAddr = "https://jefke.dmz:6443";
}; };
}; };