feat: hosts/k8s - fix k3s cidr (#200)

This commit is contained in:
Ryan Yin
2025-06-29 15:00:53 +08:00
committed by GitHub
parent aaabb5ed76
commit 0004bccc9d
14 changed files with 75 additions and 59 deletions

View File

@@ -3,6 +3,7 @@
masterHost,
tokenFile,
nodeLabels ? [],
k3sExtraArgs ? [],
...
}: let
package = pkgs.k3s;
@@ -10,7 +11,12 @@ in {
environment.systemPackages = [package];
# Kernel modules required by cilium
boot.kernelModules = ["ip6_tables" "ip6table_mangle" "ip6table_raw" "ip6table_filter"];
boot.kernelModules = [
"ip6_tables"
"ip6table_mangle"
"ip6table_raw"
"ip6table_filter"
];
networking.enableIPv6 = true;
networking.nat = {
enable = true;
@@ -29,7 +35,8 @@ in {
[
"--data-dir /var/lib/rancher/k3s"
]
++ (map (label: "--node-label=${label}") nodeLabels);
++ (map (label: "--node-label=${label}") nodeLabels)
++ k3sExtraArgs;
in
pkgs.lib.concatStringsSep " " flagList;
};