diff --git a/inventory/sample/group_vars/k8s_cluster/k8s-net-calico.yml b/inventory/sample/group_vars/k8s_cluster/k8s-net-calico.yml index a463350bb..cc0499d00 100644 --- a/inventory/sample/group_vars/k8s_cluster/k8s-net-calico.yml +++ b/inventory/sample/group_vars/k8s_cluster/k8s-net-calico.yml @@ -109,6 +109,10 @@ calico_pool_blocksize: 26 # calico_ip_auto_method: "interface=eth.*" # calico_ip6_auto_method: "interface=eth.*" +# Set FELIX_MTUIFACEPATTERN, Pattern used to discover the host’s interface for MTU auto-detection. +# see https://projectcalico.docs.tigera.io/reference/felix/configuration +# calico_felix_mtu_iface_pattern: "^((en|wl|ww|sl|ib)[opsx].*|(eth|wlan|wwan).*)" + # Choose the iptables insert mode for Calico: "Insert" or "Append". # calico_felix_chaininsertmode: Insert diff --git a/roles/network_plugin/calico/defaults/main.yml b/roles/network_plugin/calico/defaults/main.yml index 2de146514..0c2be2dd8 100644 --- a/roles/network_plugin/calico/defaults/main.yml +++ b/roles/network_plugin/calico/defaults/main.yml @@ -108,6 +108,10 @@ calico_wireguard_repo: https://download.copr.fedorainfracloud.org/results/jdoss/ # calico_ip_auto_method: "interface=eth.*" # calico_ip6_auto_method: "interface=eth.*" +# Set FELIX_MTUIFACEPATTERN, Pattern used to discover the host’s interface for MTU auto-detection. +# see https://projectcalico.docs.tigera.io/reference/felix/configuration +# calico_felix_mtu_iface_pattern: "^((en|wl|ww|sl|ib)[opsx].*|(eth|wlan|wwan).*)" + calico_baremetal_nodename: "{{ kube_override_hostname | default(inventory_hostname) }}" kube_etcd_cacert_file: ca.pem diff --git a/roles/network_plugin/calico/templates/calico-node.yml.j2 b/roles/network_plugin/calico/templates/calico-node.yml.j2 index cc461516b..3af01c8e7 100644 --- a/roles/network_plugin/calico/templates/calico-node.yml.j2 +++ b/roles/network_plugin/calico/templates/calico-node.yml.j2 @@ -275,6 +275,10 @@ spec: - name: IP6_AUTODETECTION_METHOD value: "{{ calico_ip6_auto_method }}" {% endif %} +{% if calico_felix_mtu_iface_pattern is defined %} + - name: FELIX_MTUIFACEPATTERN + value: "{{ calico_felix_mtu_iface_pattern }}" +{% endif %} {% if enable_dual_stack_networks %} - name: IP6 value: autodetect