lyft / cni-ipvlan-vpc-k8s

AWS VPC Kubernetes CNI driver using IPvlan
Apache License 2.0
360 stars 58 forks source link

Use OS interface names #30

Closed lbernail closed 6 years ago

lbernail commented 6 years ago

Fixes #29

The plugin expects interfaces to be named eth which is not the case on ubuntu

This commit adds an IfName attribute to Interface and populate it by comparing the ENI mac address to those returned by net.Interfaces(). It also updates method LocalName to return IfName and not eth

When looking up the MAC address in net.Interfaces, we ignore the case when no interface is found due to metadata bug on C5/M5 (see comments). The error handling code is ready but commented until this bug is patched

theatrus commented 6 years ago

This looks good to me - going to give it a test on our cluster stack to double check.

lbernail commented 6 years ago

Great If you find any issue let me know