Improved how the cluster is defined
This commit is contained in:
14
tools/render
14
tools/render
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user