feat(talos): change from net.ifnames to a macaddr deviceSelector (#1376)

* feat(talos): change from net.ifnames to a macaddr deviceSelector

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

* fix: derpge

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

* fix: logic is easier to follow now questionmark

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

* fix: logic is easier to follow now questionmark

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-03-18 19:06:19 -04:00
1 parent 91a9890a91
commit b275b781fd
10 files changed
+63 -40

No files matched your search

@@ -40,7 +40,8 @@ nodes:
#% endif %#
controlPlane: #{ (item.controller) | string | lower }#
networkInterfaces:
- interface: eth0
- deviceSelector:
hardwareAddr: "#{ item.talos_nic }#"
dhcp: false
#% if bootstrap_talos.vlan %#
vlans:
@@ -122,8 +123,7 @@ patches:
image-gc-high-threshold: 55
rotate-server-certificates: true
nodeIP:
validSubnets:
- "#{ bootstrap_node_network }#"
validSubnets: ["#{ bootstrap_node_network }#"]
# Force nameserver
- |-
@@ -139,8 +139,7 @@ patches:
machine:
time:
disabled: false
servers:
- time.cloudflare.com
servers: ["time.cloudflare.com"]
# Custom sysctl settings
- |-
@@ -158,17 +157,7 @@ patches:
- destination: /var/openebs/local
type: bind
source: /var/openebs/local
options:
- bind
- rshared
- rw
# Disable predictable NIC naming
- |-
machine:
install:
extraKernelArgs:
- net.ifnames=0
options: ["bind", "rshared", "rw"]
#% if bootstrap_talos.secureboot.enabled and bootstrap_talos.secureboot.encrypt_disk_with_tpm %#
# Encrypt system disk with TPM
@@ -186,6 +175,7 @@ patches:
- slot: 0
tpm: {}
#% endif %#
#% if bootstrap_talos.user_patches %#
# User specified global patches
- "@./patches/global.yaml"
@@ -226,10 +216,8 @@ controlPlane:
features:
kubernetesTalosAPIAccess:
enabled: true
allowedRoles:
- os:admin
allowedKubernetesNamespaces:
- system-upgrade
allowedRoles: ["os:admin"]
allowedKubernetesNamespaces: ["system-upgrade"]
#% if bootstrap_talos.user_patches %#
# User specified controlPlane patches