k3s
This commit is contained in:
1 parent
73a084fccd
commit
629d0fa261
4 files changed
+30
-20
No files matched your search
@@ -20,7 +20,12 @@ in
|
||||
};
|
||||
options = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ "defaults" ];
|
||||
default = [
|
||||
"x-systemd.automount"
|
||||
"auto"
|
||||
"nofail"
|
||||
"_netdev"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -19,6 +19,8 @@ in
|
||||
};
|
||||
|
||||
config =
|
||||
let openPorts = [ 6443 80 443 ];
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
system.activationScripts.k3sEnv = ''
|
||||
set -e
|
||||
@@ -31,6 +33,14 @@ in
|
||||
enable = true;
|
||||
environmentFile = "/var/lib/k3s/.env";
|
||||
role = cfg.role;
|
||||
extraFlags = [
|
||||
"--disable servicelb"
|
||||
"write-kubeconfig-mode 640"
|
||||
"--write-kubeconfig-group users"
|
||||
"--disable-helm-controller"
|
||||
];
|
||||
};
|
||||
networking.firewall.allowedUDPPorts = openPorts;
|
||||
networking.firewall.allowedTCPPorts = openPorts;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user