Dockin operation and maintenance management system is a safe operation and maintenance management service that optimizes exec execution performance and supports command authority management
dockin cni used to manager pod network, interact with resource manager(RM), support:
create single network
create multiple network
only support dockin-ipam ipam plugin
only support bridge to manage network
dockin cni must work with
dockin-cni, main plugin, used to call bridge to manage network, and communicate with rm
dockin-ipam, used to assign ip
bridge, used to manage network
Quick Start
1. cni configuration
You should put cni config file to /etc/cni/net.d (Default config path using by kubelet. If you redirect the config path, put the config to the path that your kubelet using).
The name of config file name can named like 00-dockin-cni.json.
You can using make to build dockin-cni and dockin-ipam. Then put them to binDir in the 00-dockin-cni.json. The binDir is /opt/cni/bin normally.
Dockin-ipam: static IP address management plugin
Overview
static IPAM is very simple IPAM plugin that assigns IPv4 and IPv6 addresses statically to container. This will be useful in case of assign same IP address in different vlan/vxlan to containers.
addresses (array, optional): an array of ip address objects:
address (string, required): CIDR notation IP address.
gateway (string, optional): IP inside of “subnet” to designate as the gateway.
routes (string, optional): list of routes add to the container namespace. Each route is a dictionary with “dst” and optional “gw” fields. If “gw” is omitted, value of “gateway” will be used.
dns (string, optional): the dictionary with “nameservers”, “domain” and “search”.
Dockin CNI - Dockin Container Network Interface
English | 中文
Dockin operation and maintenance management system is a safe operation and maintenance management service that optimizes exec execution performance and supports command authority management
For more Dockin components, please visit https://github.com/WeBankFinTech/Dockin
Dockin cni
dockin cni used to manager pod network, interact with resource manager(RM), support:
dockin cni must work with
Quick Start
1. cni configuration
You should put cni config file to
/etc/cni/net.d(Default config path using by kubelet. If you redirect the config path, put the config to the path that your kubelet using).The name of config file name can named like
00-dockin-cni.json.configuration sample:
all the parameters a described as follows:
2. Network configuration
We need to create network config file as well.
Step1: Using webhook to get network type.
Firstly, you should have a web server(webhook) to get the pod (multi)network information, and implement an API with
podNamequery parameter:Here we using Dockin-RM as the sample. You can use
curlto access RM, for example:If there is no error, you will get response like this. You web API must return a struct as below as well.
in the sample:
What we need to pay attention to is the field
type. In the sample, there is two types:testanddockinStep2: create network config file.
network configuration is the bridge configuration, for more details:
network configuration are json files which stored in
confDirset in the cni configuration. and will pass to kubelet create network.Now, let’s start to create network config.
You can find the path in the
00-dockin-cni.jsonIn the sample as above, we need to create two network config file.
1.create config for type
test:content:
2.create config for type
dockin:content:
3. Put executable binary to
binDirYou can using
maketo builddockin-cnianddockin-ipam. Then put them tobinDirin the00-dockin-cni.json. The binDir is/opt/cni/binnormally.Dockin-ipam: static IP address management plugin
Overview
static IPAM is very simple IPAM plugin that assigns IPv4 and IPv6 addresses statically to container. This will be useful in case of assign same IP address in different vlan/vxlan to containers.
Example configuration
Network configuration reference
type(string, required): “static”addresses(array, optional): an array of ip address objects:address(string, required): CIDR notation IP address.gateway(string, optional): IP inside of “subnet” to designate as the gateway.routes(string, optional): list of routes add to the container namespace. Each route is a dictionary with “dst” and optional “gw” fields. If “gw” is omitted, value of “gateway” will be used.dns(string, optional): the dictionary with “nameservers”, “domain” and “search”.Supported arguments
The following CNI_ARGS are supported:
IP: request a specific CIDR notation IP addresses, comma separatedGATEWAY: request a specific gateway address(example: CNI_ARGS=”IP=192.168.1.1/24;GATEWAY=192.168.1.254”)
The plugin also support following capability argument.
ips: Pass IP addresses for CNI interfaceThe following args conventions are supported:
ips(array of strings): A list of custom IPs to attempt to allocate, with prefix (e.g. ‘192.168.1.1/24’)Notice: If some of above are used at same time, only one will work according to the priorities below