A CNI plugin to choose the right external IP for a pod running on a machine in
the M-Lab fleet. Meant to be called as an IPAM plugin for ipvlan
, which
itself will be called as a delegate from
multus
. Networking and Kubernetes is
plugins all the way down.
The ip chosen for the pod will be an increment over the IP of the host. The exact amount to increment will either be extracted from the network configuration in k8s, or, if no k8s configuration is specified, from the name of the pod itself (usually derived from the name of the deployment).
In the network config, the increment should be specified as the index
argument
passed to the index2ip
plugin. In your network config, at some level of depth
that depends on your particular config, you should make a JSON snippet like:
{
"index": 12,
}
If the pod name contains a string of the form index[0-9]+
(for example
ndt-index12-111234-aa3b1
) then the increment will be set equal to the integer
following the index
substring (12 in this example).