range per node Writes IP address range to file (for integration with Docker or CNI) ◦ Pluggable “backend” for networking Usually vxlan - also udp, host-gw, gce, aws etc...
K8s datastore support • 5 major releases and many patch releases ◦ Commits from >70 new people • 4x slack community growth (>1000 people now) • K8s NetworkPolicy API
interactive discussions • Sign up: slack.projectcalico.org (#flannel, #calico-dev) Ideas for ways to contribute ◦ Packaging ◦ Platforms ◦ Testing, raising (good) bugs ◦ Documentation ◦ “Help wanted” labels on Github More ways to contribute than code For big things (e.g. a new dataplane driver), engage with community before coding!
export IF_NAME=flannel-vxlan; ip link del $IF_NAME 2>/dev/null; ip link add $IF_NAME type vxlan id $VNI dstport 8472 nolearning && ip link set mtu 1450 dev $IF_NAME && cat /sys/class/net/$IF_NAME/address", "PostStartupCommand": "export IF_NAME=flannel-vxlan; export SUBNET_IP=`echo $SUBNET | cut -d'/' -f 1`; ip addr add $SUBNET_IP/32 dev $IF_NAME && ip link set $IF_NAME up", "ShutdownCommand": "export IF_NAME=flannel-vxlan; ip link del $IF_NAME", "SubnetAddCommand": "export SUBNET_IP=`echo $SUBNET | cut -d'/' -f 1`; export IF_NAME=flannel-vxlan; read VTEP; ip route add $SUBNET nexthop via $SUBNET_IP dev $IF_NAME onlink && arp -s $SUBNET_IP $VTEP dev $IF_NAME && bridge fdb add $VTEP dev $IF_NAME self dst $PUBLIC_IP" } } https://github.com/coreos/flannel/blob/master/Documentation/extension.md#complex-example-vxlan
as flannel for testing • More components than flannel - check docs.projectcalico.org for guidance • Let’s look at CNI in detail ◦ Invoke plugin directly echo '{"cniVersion": "0.3.2","type":"IGNORED", "name": "a","ipam": {"type": "host-local", "subnet":"10.1.2.3/24"}}' | sudo CNI_COMMAND=ADD CNI_NETNS=a CNI_PATH=a CNI_IFNAME=a CNI_CONTAINERID=a CNI_VERSION=0.3.1 dist/calico ◦ Or use Docker to easily try out different versions echo '{"cniVersion": "0.3.2","type":"IGNORED", "name": "a","ipam": {"type": "host-local", "subnet":"10.1.2.3/24"}}' | docker run -e CNI_COMMAND=VERSION -e CNI_NETNS=a -e CNI_PATH=a -e CNI_IFNAME=a -i calico/cni:v1.6.0 ./host-local ◦ What about trying it for real under kubernetes Let’s try changing a log