fix: lower node mtu for registry egress
This commit is contained in:
@@ -17,6 +17,31 @@
|
||||
)
|
||||
when: cloud_init_binary.rc == 0
|
||||
|
||||
- name: Persist primary interface MTU for registry egress
|
||||
copy:
|
||||
dest: /etc/netplan/99-k8s-mtu.yaml
|
||||
content: |
|
||||
network:
|
||||
version: 2
|
||||
ethernets:
|
||||
{{ ansible_default_ipv4.interface | default('eth0') }}:
|
||||
mtu: {{ common_node_mtu }}
|
||||
mode: "0600"
|
||||
register: k8s_mtu_netplan
|
||||
when: common_node_mtu | int > 0
|
||||
|
||||
- name: Apply primary interface MTU immediately
|
||||
command: ip link set dev {{ ansible_default_ipv4.interface | default('eth0') }} mtu {{ common_node_mtu }}
|
||||
changed_when: false
|
||||
when: common_node_mtu | int > 0
|
||||
|
||||
- name: Apply persisted MTU netplan
|
||||
command: netplan apply
|
||||
changed_when: true
|
||||
when:
|
||||
- common_node_mtu | int > 0
|
||||
- k8s_mtu_netplan.changed
|
||||
|
||||
- name: Update apt cache
|
||||
apt:
|
||||
update_cache: true
|
||||
|
||||
Reference in New Issue
Block a user