Skip to content

Commit 18aebf3

Browse files
Allow to customize MTU in kubernetes CNI
Change-Id: Icb82f97bc6ec357def6661b0bca021f1c8e540b2 Signed-off-by: Juan-Luis de Sousa-Valadas Castaño <jlvaladas@outlook.es>
1 parent e5da79f commit 18aebf3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

containers/kubernetes/cni-init/PARAMS.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
| **Host** | |
1212
| PHYSICAL_INTERFACE | |
1313
| VROUTER_GATEWAY | |
14+
| VROUTER_MTU | 1500 |
1415
| **Kubernetes** | |
1516
| KUBEMANAGER_NESTED_MODE | 0 |
1617
| KUBERNETES_CLUSTER_NAME | k8s |

containers/kubernetes/cni-init/entrypoint.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
source /common.sh
44

5+
VROUTER_MTU=${VROUTER_MTU:-1500}
56
VROUTER_PORT=${VROUTER_PORT:-9091}
67
KUBEMANAGER_NESTED_MODE=${KUBEMANAGER_NESTED_MODE:-'0'}
78
run_command="/bin/true"
@@ -43,7 +44,8 @@ cat << EOM > /host/etc_cni/net.d/10-contrail.conf
4344
"poll-timeout" : 5,
4445
"poll-retries" : 15,
4546
"log-file" : "$LOG_DIR/cni/opencontrail.log",
46-
"log-level" : "4"
47+
"log-level" : "4",
48+
"mtu" : $VROUTER_MTU
4749
},
4850
"name": "contrail-k8s-cni",
4951
"type": "contrail-k8s-cni"
@@ -70,7 +72,8 @@ cat << EOM > /host/etc_cni/net.d/10-contrail.conf
7072
"poll-timeout" : 5,
7173
"poll-retries" : 15,
7274
"log-file" : "$LOG_DIR/cni/opencontrail.log",
73-
"log-level" : "4"
75+
"log-level" : "4",
76+
"mtu" : $VROUTER_MTU
7477
},
7578
"name": "contrail-k8s-cni",
7679
"type": "contrail-k8s-cni"

0 commit comments

Comments
 (0)