Adding kernel argument to disable predictable NIC naming. Fixes VIP (#1310)

* Adding kernel argument to disable predictable NIC naming. Fixes VIP

* Simplified talconfig jinja template by using general patches option
This commit is contained in:
Wouter Bouvy authored and GitHub committed 2024-02-11 17:54:55 -05:00
1 parent 8e145b6a9c
commit 6c637aa51f
1 file changed
+29 -47
@@ -63,10 +63,9 @@ nodes:
{% endif %}
{% endfor %}
controlPlane:
patches:
# Configure containerd
- &containerdPatch |-
- |-
machine:
files:
- op: create
@@ -81,13 +80,13 @@ controlPlane:
discard_unpacked_layers = false
# Disable search domain everywhere
- &disableSearchDomainPatch |-
- |-
machine:
network:
disableSearchDomain: true
# Enable cluster discovery
- &discoveryPatch |-
- |-
cluster:
discovery:
registries:
@@ -97,7 +96,7 @@ controlPlane:
disabled: false
# Configure kubelet
- &kubeletPatch |-
- |-
machine:
kubelet:
extraArgs:
@@ -108,16 +107,8 @@ controlPlane:
validSubnets:
- "{{ nodes.host_network }}"
# Enable KubePrism
- &kubePrismPatch |-
machine:
features:
kubePrism:
enabled: true
port: 7445
# Force nameserver
- &nameserverPatch |-
- |-
machine:
network:
nameservers:
@@ -126,7 +117,7 @@ controlPlane:
{% endfor %}
# Configure NTP
- &ntpPatch |-
- |-
machine:
time:
disabled: false
@@ -134,13 +125,35 @@ controlPlane:
- time.cloudflare.com
# Custom sysctl settings
- &sysctlPatch |-
- |-
machine:
sysctls:
fs.inotify.max_queued_events: 65536
fs.inotify.max_user_watches: 524288
fs.inotify.max_user_instances: 8192
# Mount openebs-hostpath in kubelet
- |-
machine:
kubelet:
extraMounts:
- destination: /var/openebs/local
type: bind
source: /var/openebs/local
options:
- bind
- rshared
- rw
# Disable predictable NIC naming
- |-
machine:
install:
extraKernelArgs:
- net.ifnames=0
controlPlane:
patches:
# Cluster configuration
- |-
cluster:
@@ -179,34 +192,3 @@ controlPlane:
allowedKubernetesNamespaces:
- system-upgrade
# Mount openebs-hostpath in kubelet
- &openEbsPatch |-
machine:
kubelet:
extraMounts:
- destination: /var/openebs/local
type: bind
source: /var/openebs/local
options:
- bind
- rshared
- rw
{% if nodes.inventory | selectattr('controller', 'equalto', False) | list | length %}
worker:
{% if distribution.talos.schematics.enabled %}
schematic:
customization:
{{ distribution.talos.schematics.customization | indent(6, first=True) }}
{% endif %}
patches:
- *containerdPatch
- *disableSearchDomainPatch
- *discoveryPatch
- *kubeletPatch
- *kubePrismPatch
- *nameserverPatch
- *ntpPatch
- *sysctlPatch
- *openEbsPatch
{% endif %}