fix: address talos comments (#1253)

* fix: update cni to cilium in taskfile

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: more updates

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: more cleanup

Signed-off-by: Devin Buhl <devin@buhl.casa>

* chore: housekeeping

Signed-off-by: Devin Buhl <devin@buhl.casa>

---------

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl authored and GitHub committed 2024-01-26 14:59:11 -05:00
1 parent ab93b0e44e
commit 90ca5f026f
16 files changed
+126 -101

No files matched your search

+4 -4
View File
@@ -58,10 +58,10 @@ def _validate_distribution(distribution: str) -> None:
def _validate_node(node: dict, node_cidr: str, distribution: str) -> None:
if not node.get("name"):
raise ValueError(f"A node is missing a name")
if not node.get("username") and distribution not in ["k0s", "k3s"]:
raise ValueError(f"Node {node.get('name')} is missing a username")
if not node.get("diskSerial") and distribution in ["talos"]:
raise ValueError(f"Node {node.get('name')} is missing a disk serial")
if not node.get("ssh", {}).get("username") and distribution in ["k0s", "k3s"]:
raise ValueError(f"Node {node.get('name')} is missing a SSH username")
if not node.get("disk_device") and distribution in ["talos"]:
raise ValueError(f"Node {node.get('name')} is missing a disk device")
if not re.match(r"^[a-z0-9-\.]+$", node.get('name')):
raise ValueError(f"Node {node.get('name')} has an invalid name")
ip = _validate_ip(node.get("address"))