Files
nix-config/hosts/k8s/k3s-test-1-worker-1/default.nix
T
ryan4yin | 二花 d40ed42f6c feat(k3s-test-1): add three worker nodes and taint the control plane (#283)
* feat(k3s-test-1): add three worker nodes and taint the control plane

- hosts/k8s/k3s-test-1-worker-{1,2,3} (k3s agents) + flake outputs
- vars/networking: .117/.118/.119 (the .111-.113 range is still held by the
  never-deployed k3s-prod-1 workers)
- k3s-test-1-master-{1,2,3}: nodeTaints=node-role.kubernetes.io/control-plane:NoSchedule
- Justfile: upload the worker images too

* chore(k3s-test-1): move the workers to .111-.113

The k3s-prod-1 entries that held those addresses are gone (nix-config#284).
2026-09-21 12:56:49 +08:00

31 lines
768 B
Nix

{
config,
pkgs,
myvars,
mylib,
...
}:
let
hostName = "k3s-test-1-worker-1"; # define your hostname.
coreModule = mylib.genKubeVirtGuestModule {
inherit pkgs hostName;
inherit (myvars) networking;
};
k3sModule = mylib.genK3sAgentModule {
inherit pkgs;
tokenFile = config.age.secrets."k3s-test-1-token".path;
# use my own domain & kube-vip's virtual IP for the API server
# so that the API server can always be accessed even if some nodes are down
masterHost = "test-cluster-1.writefor.fun";
# workloads run on the workers; the masters are tainted (see k3s-test-1-master-*)
nodeLabels = [ "node-role.kubernetes.io/worker=true" ];
};
in
{
imports = (mylib.scanPaths ./.) ++ [
coreModule
k3sModule
];
}