Skip to content

Commit

Permalink
Calico: fix node ip subnet detection (kubernetes-sigs#7065)
Browse files Browse the repository at this point in the history
We are currently setting the IP variable to hostIP,
Before projectcalico/node#593 (not yet released)
Calico interpret that as hostIP/32
Using 'can-reach' we get the future behavior
This fixes vxlan and IPIP CrossSubnet modes

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
  • Loading branch information
champtar authored Dec 21, 2020
1 parent 3470810 commit 7d7739e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion roles/network_plugin/calico/templates/calico-node.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,14 @@ spec:
- name: IP
value: "autodetect"
{% else %}
- name: IP
- name: NODEIP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: IP_AUTODETECTION_METHOD
value: "can-reach=$(NODEIP)"
- name: IP
value: "autodetect"
{% endif %}
{% if calico_use_default_route_src_ipaddr|default(false) %}
- name: FELIX_DEVICEROUTESOURCEADDRESS
Expand Down

0 comments on commit 7d7739e

Please sign in to comment.