Improved how the cluster is defined

This commit is contained in:
2025-11-09 03:22:29 +01:00
parent 244c982b17
commit 498b0ba480
6 changed files with 15 additions and 18 deletions

View File

@@ -135,15 +135,11 @@ def main():
)
)
# Get all clusterName & controlPlaneIp pairs
clusters = map(
lambda node: {
"name": node["clusterName"],
"controlPlaneIp": node["controlPlaneIp"],
},
nodes,
)
clusters = [dict(s) for s in set(frozenset(d.items()) for d in clusters)]
# Get all clusters
# NOTE: This assumes that all nodes in the cluster use the same definition for the cluster
clusters = [
dict(s) for s in set(frozenset(node["cluster"].items()) for node in nodes)
]
with open(ROOT.joinpath("config.yaml")) as fyaml:
config = yaml.safe_load(fyaml)