diff --git a/manifests/apply.sh b/manifests/apply.sh index 68f813a..622b8fe 100755 --- a/manifests/apply.sh +++ b/manifests/apply.sh @@ -6,10 +6,6 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" # Change to the script directory cd "$SCRIPT_DIR" -# First, label the nodes to control Longhorn rollout -for n in isaiah jeremiah zeke; do - kubectl label nodes "${n}" "node.longhorn.io/create-default-disk=config" -done # Now, configure longhorn settings for each node kubectl annotate nodes --overwrite isaiah 'node.longhorn.io/default-disks-config=[ { "path": "/var/lib/longhorn", "allowScheduling" : true, "tags": ["hdd", "large"]} diff --git a/modules/nixos/kubernetes.nix b/modules/nixos/kubernetes.nix index d88a859..7a36810 100644 --- a/modules/nixos/kubernetes.nix +++ b/modules/nixos/kubernetes.nix @@ -78,6 +78,7 @@ in "--write-kubeconfig-mode 0640" "--write-kubeconfig-group kubeconfig" "--resolv-conf=/etc/resolv.conf" + "--node-label node.longhorn.io/create-default-disk=config" "--tls-san ${config.networking.hostName}.home" "--tls-san ${config.networking.hostName}.thehellings.lan" "--tls-san ${config.networking.hostName}.shire-zebra.ts.net"