fix: lower node mtu for registry egress
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
common_upgrade_packages: false
|
common_upgrade_packages: false
|
||||||
|
common_node_mtu: 1400
|
||||||
tailscale_auth_key: ""
|
tailscale_auth_key: ""
|
||||||
tailscale_ssh: false
|
tailscale_ssh: false
|
||||||
tailscale_accept_routes: false
|
tailscale_accept_routes: false
|
||||||
|
|||||||
@@ -17,6 +17,31 @@
|
|||||||
)
|
)
|
||||||
when: cloud_init_binary.rc == 0
|
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
|
- name: Update apt cache
|
||||||
apt:
|
apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
|||||||
Reference in New Issue
Block a user