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
+30 -48
@@ -63,10 +63,9 @@ nodes:
{% endif %} {% endif %}
{% endfor %} {% endfor %}
controlPlane: patches:
patches:
# Configure containerd # Configure containerd
- &containerdPatch |- - |-
machine: machine:
files: files:
- op: create - op: create
@@ -81,13 +80,13 @@ controlPlane:
discard_unpacked_layers = false discard_unpacked_layers = false
# Disable search domain everywhere # Disable search domain everywhere
- &disableSearchDomainPatch |- - |-
machine: machine:
network: network:
disableSearchDomain: true disableSearchDomain: true
# Enable cluster discovery # Enable cluster discovery
- &discoveryPatch |- - |-
cluster: cluster:
discovery: discovery:
registries: registries:
@@ -97,7 +96,7 @@ controlPlane:
disabled: false disabled: false
# Configure kubelet # Configure kubelet
- &kubeletPatch |- - |-
machine: machine:
kubelet: kubelet:
extraArgs: extraArgs:
@@ -108,16 +107,8 @@ controlPlane:
validSubnets: validSubnets:
- "{{ nodes.host_network }}" - "{{ nodes.host_network }}"
# Enable KubePrism
- &kubePrismPatch |-
machine:
features:
kubePrism:
enabled: true
port: 7445
# Force nameserver # Force nameserver
- &nameserverPatch |- - |-
machine: machine:
network: network:
nameservers: nameservers:
@@ -126,7 +117,7 @@ controlPlane:
{% endfor %} {% endfor %}
# Configure NTP # Configure NTP
- &ntpPatch |- - |-
machine: machine:
time: time:
disabled: false disabled: false
@@ -134,13 +125,35 @@ controlPlane:
- time.cloudflare.com - time.cloudflare.com
# Custom sysctl settings # Custom sysctl settings
- &sysctlPatch |- - |-
machine: machine:
sysctls: sysctls:
fs.inotify.max_queued_events: 65536 fs.inotify.max_queued_events: 65536
fs.inotify.max_user_watches: 524288 fs.inotify.max_user_watches: 524288
fs.inotify.max_user_instances: 8192 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 configuration
- |- - |-
cluster: cluster:
@@ -179,34 +192,3 @@ controlPlane:
allowedKubernetesNamespaces: allowedKubernetesNamespaces:
- system-upgrade - 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 %}