Override mtu only if explicitly specified.

Testing Done:

1. Created a cluster without explicitly setting MTU. Verified that the calico nodes came up. The config map didn't have any mtu setting. The FELIX_IPINIPMTU env variable was not set.

2. Created a cluster by explicitly setting the MTU in the kops config. Verified that calico nodes came up. Config map had correct value for "mtu". The FELIX_IPINIPMTU env variable was set to correct value.
This commit is contained in:
Shri Javadekar 2018-06-28 23:30:51 -07:00
parent 35edca3e42
commit 3c4239645f
1 changed files with 6 additions and 2 deletions

View File

@ -32,7 +32,9 @@ data:
"etcd_scheme": "https", "etcd_scheme": "https",
{{- end }} {{- end }}
"log_level": "info", "log_level": "info",
"mtu": {{- or .Networking.Calico.MTU 8981 }}, {{- if .Networking.Calico.MTU }}
"mtu": {{- or .Networking.Calico.MTU }},
{{- end }}
"ipam": { "ipam": {
"type": "calico-ipam" "type": "calico-ipam"
}, },
@ -217,8 +219,10 @@ spec:
value: "{{- or .Networking.Calico.PrometheusProcessMetricsEnabled "true" }}" value: "{{- or .Networking.Calico.PrometheusProcessMetricsEnabled "true" }}"
- name: FELIX_HEALTHENABLED - name: FELIX_HEALTHENABLED
value: "true" value: "true"
{{- if .Networking.Calico.MTU }}
- name: FELIX_IPINIPMTU - name: FELIX_IPINIPMTU
value: "{{- or .Networking.Calico.MTU 8981 }}" value: "{{- or .Networking.Calico.MTU }}"
{{- end}}
securityContext: securityContext:
privileged: true privileged: true
volumeMounts: volumeMounts: