index2ip

command module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

README

index2ip

GoDoc Build Status Coverage Status Go Report Card

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.

Usage

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

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,
}

In the name of the pod

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).

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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