Do not import kubernets node labels from nixos-servers

This commit is contained in:
Pim Kunis 2024-11-04 23:16:51 +01:00
parent e18f3c7caa
commit 7be57d26f0
4 changed files with 157 additions and 23 deletions

View file

@ -1,6 +1,5 @@
inputs @ {
self,
servers,
flake-utils,
nixpkgs,
kubenix,
@ -14,12 +13,10 @@ flake-utils.lib.eachDefaultSystem
buildCommand = "${old.buildCommand}\npatchShebangs $out";
});
machines = servers.machines.${system};
mkKubernetes = name: module: namespace:
(kubenix.evalModules.${system} {
specialArgs = {
inherit namespace system machines self;
inherit namespace system self;
inherit (inputs) nixhelm blog-pim dns nixpkgs nixng;
inherit (self) globals;
@ -74,8 +71,8 @@ flake-utils.lib.eachDefaultSystem
postBuild = let
# HACK: create normal way of checking if server runs k8s
k8sMachines = lib.filterAttrs (n: m: m.kubernetesNodeLabels != null) machines;
k8sServerNames = builtins.concatStringsSep " " (builtins.attrNames k8sMachines);
k8sMachines = builtins.attrNames self.globals.nodeLabels;
k8sServerNames = builtins.concatStringsSep " " k8sMachines;
in
/*
bash