diff --git a/roles/network_plugin/calico/templates/calico-node.yml.j2 b/roles/network_plugin/calico/templates/calico-node.yml.j2 index 3a01648f76318de005ae45f0df0c4017ca7e3d40..45023d0cf8850be44c48f676ef0c00d1374b2f88 100644 --- a/roles/network_plugin/calico/templates/calico-node.yml.j2 +++ b/roles/network_plugin/calico/templates/calico-node.yml.j2 @@ -108,10 +108,15 @@ spec: configMapKeyRef: name: calico-config key: etcd_cert +{% if calico_ip_auto_method is defined %} + - name: IP_AUTODETECTION_METHOD + value: "{{ calico_ip_auto_method }}" +{% else %} - name: IP valueFrom: fieldRef: fieldPath: status.hostIP +{% endif %} - name: NODENAME valueFrom: fieldRef: