mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-30 14:15:38 -02:30
The [[:alnum:]]* capture truncates interface names at the first character that is not a letter or digit: eth0.100 (VLAN) becomes eth0, br-9a93... becomes br, bond0.200 becomes bond0. The result feeds node_default_gateway_interface, which the macvlan MASQUERADE rules use as the -o match (RedHat post-up/post-down and the Flatcar NAT service under enable_nat_default_gateway), so pod traffic egressing the default gateway loses NAT because the rule references a wrong or nonexistent interface. Capture the whole whitespace-delimited token after ' dev ' instead. The leading space also keeps the greedy match from latching onto names that themselves end in 'dev' (e.g. lan-dev).