blob: 33566070cf533a822bc71758b96cfa3e2b679132 [file] [log] [blame]
{ hscloud, pkgs, hscloudForPkgs, ... }:
{
# Used by clustercfg to figure out which machines need kube certs.
kubeMachineNames = let
isKubeMachine = n: value:
n != "__readTree" &&
(builtins.hasAttr "hscloud" value.options) &&
(builtins.hasAttr "kube" value.options.hscloud) &&
value.options.hscloud.kube.control.enable.value;
machines = pkgs.lib.filterAttrs isKubeMachine hscloud.ops.machines;
names = pkgs.lib.mapAttrsToList (name: _: name) machines;
in names;
}