You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Issue
In the current configuration, all k3s nodes appear to be initialized with the --cluster-init flag, despite clusterInit being explicitly set to true only for the primary node (homelab-0). This results in unintended behavior where each server in the cluster runs as an initial server node.
The expectation is that clusterInit would apply only to homelab-0. However, setting --cluster-init in extraFlags causes all nodes to receive this flag, effectively overriding the clusterInit condition.
Relevant Code in nixpkgs
The NixOS k3s service configuration processes clusterInit separately from extraFlags, meaning additional flags in extraFlags are simply appended rather than overriding the conditions set by clusterInit:
Expected Behavior
Only the primary node, homelab-0, should initialize the cluster with --cluster-init, while all other nodes should connect to it using --server https://homelab-0:6443.
The text was updated successfully, but these errors were encountered:
Describe the Issue
In the current configuration, all k3s nodes appear to be initialized with the
--cluster-init
flag, despiteclusterInit
being explicitly set totrue
only for the primary node (homelab-0
). This results in unintended behavior where each server in the cluster runs as an initial server node.homelab/nixos/configuration.nix
Lines 55 to 69 in 1491d75
The expectation is that
clusterInit
would apply only tohomelab-0
. However, setting--cluster-init
inextraFlags
causes all nodes to receive this flag, effectively overriding theclusterInit
condition.Relevant Code in nixpkgs
The NixOS k3s service configuration processes
clusterInit
separately fromextraFlags
, meaning additional flags inextraFlags
are simply appended rather than overriding the conditions set byclusterInit
:https://github.com/NixOS/nixpkgs/blob/44cb05c5e6f21e8f80333d7c9eebae456d595f57/nixos/modules/services/cluster/k3s/default.nix#L515-L517
Expected Behavior
Only the primary node,
homelab-0
, should initialize the cluster with--cluster-init
, while all other nodes should connect to it using--server https://homelab-0:6443
.The text was updated successfully, but these errors were encountered: