Mirantis / virtlet

Kubernetes CRI implementation for running VM workloads
Apache License 2.0
739 stars 128 forks source link

Make Virtlet work with newer Calico #913

Closed ivan4th-jenkins closed 4 years ago

ivan4th-jenkins commented 4 years ago

For now, only DHCP-based networking works for Calico. There's a difficulty with passing link-scoped routes through cloud-init network config (both nocloud and configdrive), so for now cloud-init sets up DHCP for each CNI-provided network interface. This should also help with persistent roots where cloud-init based network configuration wasn't being updated after re-creating the pod.

The patch is inspired by kubevirt/kubevirt#1436 and removes the old scheme that was making a "fake pod", because it's no longer possible to create such "fake pods" in new versions of Calico (they always must correspond to a real pod).

This PR also renames virtlet-eth0 to eth0, removing compatibility problems with some old CNI Genie versions.

I didn't test multiple CNI with this PR yet.


This change is Reviewable

ivan4th commented 4 years ago

oops, wrong account ;(