From 5d2994f470a870607e56e2d832c132672369a94f Mon Sep 17 00:00:00 2001 From: sportshead Date: Wed, 1 Apr 2026 00:29:11 +0800 Subject: [PATCH] nixos/rancher: add nodeExternalIP option to match nodeIP option Relevant docs: - [k3s](https://docs.k3s.io/cli/agent#networking) - [rke2](https://docs.rke2.io/reference/server_config#agentnetworking) --- nixos/modules/services/cluster/rancher/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/modules/services/cluster/rancher/default.nix b/nixos/modules/services/cluster/rancher/default.nix index c511da5a62f5..9dd3028614ca 100644 --- a/nixos/modules/services/cluster/rancher/default.nix +++ b/nixos/modules/services/cluster/rancher/default.nix @@ -518,6 +518,12 @@ let default = null; }; + nodeExternalIP = lib.mkOption { + type = lib.types.nullOr lib.types.str; + description = "IPv4/IPv6 external addresses to advertise for node."; + default = null; + }; + selinux = lib.mkOption { type = lib.types.bool; description = "Enable SELinux in containerd."; @@ -936,6 +942,7 @@ let ++ (lib.optionals (cfg.nodeLabel != [ ]) (map (l: "--node-label=${l}") cfg.nodeLabel)) ++ (lib.optionals (cfg.nodeTaint != [ ]) (map (t: "--node-taint=${t}") cfg.nodeTaint)) ++ (lib.optional (cfg.nodeIP != null) "--node-ip=${cfg.nodeIP}") + ++ (lib.optional (cfg.nodeExternalIP != null) "--node-external-ip=${cfg.nodeExternalIP}") ++ (lib.optional cfg.selinux "--selinux") ++ (lib.optional (kubeletParams != { }) "--kubelet-arg=config=${kubeletConfig}") ++ (lib.optional (cfg.extraKubeProxyConfig != { }) "--kube-proxy-arg=config=${kubeProxyConfig}")