Mirantis / virtlet

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

Make Virtlet work with newer Calico #914

Closed ivan4th closed 4 years ago

ivan4th commented 5 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

claassistantio commented 5 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Ivan Shvedunov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

jellonek commented 4 years ago

IMO instead of removing an option to pass configuration/routes through CD image that should be left as an option, which could be covered by some annotation or even global configuration option to force "old" mode. SR-IOV is only case which I see at the moment which can not use our dhcp. IDK if there is something similar in the wild with same limitation.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.