-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kubernetes CNI plugin for EVE #3795
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3795 +/- ##
=======================================
Coverage 17.51% 17.51%
=======================================
Files 3 3
Lines 805 805
=======================================
Hits 141 141
Misses 629 629
Partials 35 35 ☔ View full report in Codecov by Sentry. |
7388226
to
e67cb50
Compare
Some Yetus issues remain but they are either expected or do not make sense. |
What's the impact on the EVE image size? |
It seems that rootfs.img increased in size by 17MB. However, installed eve-bridge has "only" 4MB. Seems that other CNI plugins add some extra megabytes (they are all written in Go). I will remove those that we do not use.
But note that this is "kubevirt" EVE. Kvm/xen EVE do not build the kube container. |
Update: I have removed unused CNI plugins from the image and the rootfs size increase dropped to 7MB. |
Understood. But only picking the ones you need makes sense since we don't want to drive the kubevirt image size to quickly towards the 512MB partition size limit. |
From an architectural and documentation perspective, I have a few questions:
|
05b919d
to
f5fa32c
Compare
It is from draw.io
Fixed, now all arrows have numbers.
Done, kubevirt-specific steps are highlighted with a green color.
Not yet, I will add something in a separate PR.
Currently, we do not have "kubevirt-EVE" documentation since everything is still a work in-progress (and many changes are not even committed to the main EVE repo yet). Eventually, there should be documentation about this new EVE variant and this eve-bridge doc will be linked and partially moved there.
Yes
Yes, correct. Actually, pod is wrapped inside a "sandbox" container, which implements the network isolation using "normal" network namespace. This network namespace is even "named", meaning that there is a link to it from
Kubernetes checks for the presence of this "eth0" interface and will not consider Pod as properly connected if it cannot find it in the pod's network namespace.
We could in theory replicate this multus logic in eve-bridge. For multiple interfaces, eve-bridge would need more complicated config file, get pod annotations from the Kubernetes API server, delegate the "Kubernetes interface" to Flannel, etc. I wanted to keep our CNI plugin as simple as possible and use the composition of CNI plugins instead. Later we could rethink this and avoid extra dependencies if it is worth it.
My primary goal was to avoid the hell of asynchronous programming, which we already have enough of in pillar. CNI plugin is supposed to create connection immediately and return only when it is done (successfully or with error). Pubsub is not practical for the request-response communication. Also, I wanted to limit the number of imports and dependencies in eve-bridge (to keep it small). Lastly, I wanted to avoid having multiple agents managing network configuration. We already have nim-zedrouter separation and it is not easy to avoid race conditions between them. It is just so much easier having zedrouter completely taking care of network instances and application interfaces connected to them. |
Thanks. That should make it a lot easier to update going forward
Thanks
That makes it easier. Even better if the diagram or README says it.
Makes sense.
Which makes it even easier. Thanks for explaining
🤦♂️ Not much of a choice, then, is there.
No, then it isn't. If the only thing we were doing was having multus delegate to eve-bridge, which is what I thought, then we could just use eve-bridge directly. Even multiple interfaces are multiple
We have async hell? Really? 🤣
These all make sense. My concern is with the added complexity of zedrouter, which now has pubsub and RPC, and we have to know which is which. If this is simpler than sticking with the current, so be it. |
Where is this "filtering" taking place? |
And I've been (naively) thinking it was a lifestyle choice ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
golang.org/x/sys v0.13.0 // indirect | ||
) | ||
|
||
// TODO: Remove the replace directive once cnirpc is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will this take place? Now or after merging this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After merging this PR. Then I can properly reference EVE commit which has this package included.
It is not yet submitted to the main EVE repo. For now you can see it in the Naiming's fork: https://github.com/naiming-zededa/eve/blob/poc-dec3/pkg/pillar/hypervisor/kubevirt.go#L235-L247 |
From the standard set of CNI plugins, EVE will use the bridge plugin. Signed-off-by: Milan Lenco <milan@zededa.com>
Done (mentioned arrow coloring in the readme). |
eve-bridge is a CNI plugin for Kubernetes which allows connecting Pods with EVE Network Instances. This CNI plugin establishes Pod connectivity in cooperation with the zedrouter microservice. A CNI request received from Kubernetes to connect Pod to a given network instance is delegated by eve-bridge to zedrouter via RPC calls over an AF-UNIX socket. More details can be found in the documentation submitted under pkg/kube/eve-bridge/README.md Signed-off-by: Milan Lenco <milan@zededa.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
eve-bridge
is a CNI plugin for Kubernetes which allows connectingPods with EVE Network Instances. This CNI plugin establishes
Pod connectivity in cooperation with the zedrouter microservice.
A CNI request received from Kubernetes to connect Pod to a given
network instance is delegated by eve-bridge to zedrouter via RPC
calls over an AF-UNIX socket. More details can be found in the
documentation submitted under
pkg/kube/eve-bridge/README.md
Note that majority of changes in this PR are vendored deps for eve-bridge & pillar.
I have put them into separate commits (the last two).
I therefore recommend to review this PR commit-by-commit.