mirror of https://github.com/k3s-io/k3s
11 lines
339 B
Bash
11 lines
339 B
Bash
#!/bin/bash
|
|
|
|
[ "$IFACE" == "eth0" ] || exit 0
|
|
|
|
{% for host, ip_addrs in salt['mine.get']('roles:kubernetes-pool', 'network.ip_addrs', 'grain').items() %}
|
|
{% if ip_addrs[0] != salt['network.ip_addrs']('eth0')[0] %}
|
|
{% set cidr = salt['mine.get'](host, 'grains.items')[host]['cbr-cidr'] %}
|
|
route del -net {{ cidr }}
|
|
{% endif %}
|
|
{% endfor %}
|