surveyor-cni

module
v0.0.0-...-287aef4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2023 License: Apache-2.0

README

surveyor-cni

A CNI plugin for mapping interfaces to networks (instead of interface names!)

But, why?

The gist is, if you've got a situation where you have a non-uniform k8s environment, let's say you have one node that has "eth1" and another box with an interface named "eth2", but they're both attached to the same switch, and you go to set a master parameter on macvlan CNI, you have to create two configurations.

This tool allows you give some meaning to networks. It creates Kubernetes CustomResources which you can use to associate interfaces with networks, and then attach pods to networks -- as opposed to interfaces. An abstraction layer, a way to give some semantics to network attachments.

Best paired with Multus CNI

Currently pre-alpha!

So, what's it do?

The tool currently create macvlan networks akin to the macvlan plugin (to be expanded later)

Quickstart

Requirements
  • A running Kubernetes cluster (I'd recommend kubeadm if you want to try one!)
  • You have Multus CNI installed, you can use the quickstart guide to install it.
  • You have the CNI reference plugins installed (semi-optional, but you'll have to update the examples to remove static IPAM CNI)
  • Optional: You've tried macvlan + Multus before, which can give you some more context (The Multus quickstart guide above will help you there)
Installation
Give it a whirl!

Trivia

I originally wanted to name the plugin after my favorite Adirondack explorer, Verplanck Colvin, who was a topological engineer who through great adventures helped to survey and map to the Adirondack Mountains which for a long time remained largely unexplored. However, I couldn't figure out a way to make it roll off the tongue, so I stuck with "Surveyor CNI" as it gives a way to kind of survey the equipment you have, and then semantically map it. He also came up with a cool little invention which was basically a pinwheel he'd install on a mountain top so he could get a shine off it on a sunny day to help him sight where the mountain top was exactly.

The logo is created with the help of MidJourney. I realize that these imagery AI's are somewhat controversial, but I was trying to whip something up while travelling and had a low power laptop and no mouse, so I figured I'd give it a try, and tried to prompt MidJourney with what I thought Verplanck might look like while atop the mountain.

Limitations / What could be done better

  • It's a PoC right now! So beware.
  • This uses a local fork of the macvlan CNI, it could use a delegated call instead.
  • That also means, it's basically just macvlan CNI + mapping. It'd be cooler to be more generic.
  • I'm unsure how well runtimeconfigs work.
  • There's no testing (patches please!)
  • There's no automated builds.

Directories

Path Synopsis
pkg
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/k8s.cni.cncf.io/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL