From b19f2e2d3d327060deea3446d2c9bc351be81a95 Mon Sep 17 00:00:00 2001
From: Minjong Kim <make.dirty.code@gmail.com>
Date: Wed, 22 Jul 2020 15:58:18 +0900
Subject: [PATCH] Update the calico_veth_mtu setting to affect IP-in-IP users
 (#6419)

* Update calico_veth_mtu to FELIX_IPINIP variable

calico_veth_mtu is specified in the configuration, but since it only works for wireguard, modify it to work for IP-in-IP users.

* Update template with more cleaner expression
---
 roles/network_plugin/calico/templates/calico-node.yml.j2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/roles/network_plugin/calico/templates/calico-node.yml.j2 b/roles/network_plugin/calico/templates/calico-node.yml.j2
index 981b9fc38..7b125be52 100644
--- a/roles/network_plugin/calico/templates/calico-node.yml.j2
+++ b/roles/network_plugin/calico/templates/calico-node.yml.j2
@@ -232,7 +232,7 @@ spec:
             # Set MTU for tunnel device used if ipip is enabled
 {% if calico_mtu is defined %}
             - name: FELIX_IPINIPMTU
-              value: "{{ calico_mtu }}"
+              value: "{{ calico_veth_mtu | default(calico_mtu) }}"
 {% endif %}
             - name: FELIX_CHAININSERTMODE
               value: "{{ calico_felix_chaininsertmode }}"
-- 
GitLab