diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-10-06 16:21:43 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-10-06 16:24:31 +0200 |
commit | fec3f62d38585455fe8bac4634e307d8728c387b (patch) | |
tree | 508940cd2064c317b9a8431714cc554fa1e97c36 /nixos/modules/services/cluster | |
parent | f43716f28e1c7c787e003bd83dd1e897b360240a (diff) |
nixos/kubelet: Refactor to use config.networking.fqdnOrHostName
Diffstat (limited to 'nixos/modules/services/cluster')
-rw-r--r-- | nixos/modules/services/cluster/kubernetes/kubelet.nix | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/nixos/modules/services/cluster/kubernetes/kubelet.nix b/nixos/modules/services/cluster/kubernetes/kubelet.nix index ae9548bdba22..769143a6a3ff 100644 --- a/nixos/modules/services/cluster/kubernetes/kubelet.nix +++ b/nixos/modules/services/cluster/kubernetes/kubelet.nix @@ -176,8 +176,7 @@ in hostname = mkOption { description = lib.mdDoc "Kubernetes kubelet hostname override."; - default = config.networking.hostName; - defaultText = literalExpression "config.networking.hostName"; + defaultText = literalExpression "config.networking.fqdnOrHostName"; type = str; }; @@ -357,8 +356,8 @@ in boot.kernelModules = ["br_netfilter" "overlay"]; - services.kubernetes.kubelet.hostname = with config.networking; - mkDefault (hostName + optionalString (domain != null) ".${domain}"); + services.kubernetes.kubelet.hostname = + mkDefault config.networking.fqdnOrHostName; services.kubernetes.pki.certs = with top.lib; { kubelet = mkCert { |