From dd9d0c05301fe1229aeabc5e53a1bc41c1bd68a0 Mon Sep 17 00:00:00 2001
From: Anton Fayzrahmanov <f84anton@gmail.com>
Date: Fri, 23 Mar 2018 16:33:20 +0300
Subject: [PATCH] optional calico_ip_auto_method variable with
 IP_AUTODETECTION_METHOD

can be set to one of
first-found
can-reach
interface
---
 roles/network_plugin/calico/templates/calico-node.yml.j2 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/roles/network_plugin/calico/templates/calico-node.yml.j2 b/roles/network_plugin/calico/templates/calico-node.yml.j2
index 3a01648f7..45023d0cf 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:
-- 
GitLab