kubernetes-sigs / blixt

Layer 4 Kubernetes load-balancer
Apache License 2.0
318 stars 44 forks source link

Dataplane interface resolution with syscalls #49

Open shaneutt opened 1 year ago

shaneutt commented 1 year ago

Problem Statement

During #41 we added a mechanism to identify the kind-net network interface that would be needed for our TC program to redirect packets to Pods, but as a stop-gap as the PR was already getting quite large we implemented that using the iproute2 command line. The purpose of this task is to replace that with syscalls to make it more portable.

Prerequisites

Additional Notes

Investigate ~https://github.com/redhat-et/emerita/blob/ade6ca9c1215704da6ce033e0b4e8a5f39dbd908/emerita/src/netlink.rs#L46~ https://github.com/rust-netlink

Check out this crate, which is higher level and doesn't require direct syscalls: https://crates.io/crates/netlink-packet-route

Acceptance Criteria

rushi47 commented 1 year ago

Not sure @shaneutt if I could pull this off. But would love to know if this one, is good point to jump & look towards Data-plane

shaneutt commented 1 year ago

Not sure @shaneutt if I could pull this off. But would love to know if this one, is good point to jump & look towards Data-plane

Yeah, I would say so. I think though it is fair to say, that while it's in the dataplane code the subject matter is more of Rust and Linux than of the data path (e.g. this doesn't require any eBPF code changes).

rushi47 commented 1 year ago

Can I give shot to this 🤚 Edit : probably will complete : https://github.com/Kong/blixt/issues/40 this first.

shaneutt commented 1 year ago

Can I give shot to this raised_back_of_hand Edit : probably will complete : #40 this first.

Ok, whatever works best for you. Note that this one will probably be simpler and more straightforward than #40 so it may be better to start with this one as it will be an easier entry point to starting to contribute to the dataplane code.

rushi47 commented 1 year ago

@shaneutt Oh perfect, will you be able to assign me this then ? Will try to give shot on this one.

shaneutt commented 1 year ago

Just a heads up, looks like a couple of months ago the Netlink crate's source moved to:

https://github.com/rust-netlink

Looks like things aren't fully moved over yet, including the crates.io page not updated yet. Just a heads up.