blob: 33566070cf533a822bc71758b96cfa3e2b679132 [file] [log] [blame]
Serge Bazanski9f0e1e82023-03-31 22:36:54 +00001{ hscloud, pkgs, hscloudForPkgs, ... }:
2
3{
4 # Used by clustercfg to figure out which machines need kube certs.
5 kubeMachineNames = let
6 isKubeMachine = n: value:
7 n != "__readTree" &&
8 (builtins.hasAttr "hscloud" value.options) &&
9 (builtins.hasAttr "kube" value.options.hscloud) &&
10 value.options.hscloud.kube.control.enable.value;
11 machines = pkgs.lib.filterAttrs isKubeMachine hscloud.ops.machines;
12 names = pkgs.lib.mapAttrsToList (name: _: name) machines;
13 in names;
14}