Ensure the bandwith plugin chooses the host veth device

When chained with a plugin that returns multiple devices, the bandwidth
plugin chooses the host veth device.

Signed-off-by: Tyler Schultz <tschultz@pivotal.io>
This commit is contained in:
Aidan Obley
2018-03-12 15:08:53 -07:00
committed by Tyler Schultz
parent d5bdfe4cbd
commit d2f6472474
6 changed files with 261 additions and 66 deletions

View File

@ -0,0 +1,12 @@
{
"cniVersion": "0.3.1",
"name": "network-chain-test",
"type": "bridge",
"bridge": "test-bridge-0",
"isDefaultGateway": true,
"ipam": {
"type": "host-local",
"subnet": "10.11.2.0/24",
"dataDir": "/tmp/foo"
}
}

View File

@ -1,20 +0,0 @@
{
"cniVersion": "0.3.1",
"name": "chained-bridge-bandwidth",
"plugins": [
{
"type": "bridge",
"ipam": {
"type": "host-local",
"subnet": "10.11.2.0/24"
}
},
{
"type": "bandwidth",
"ingressRate": 800,
"ingressBurst": 200,
"egressRate": 800,
"egressBurst": 200
}
]
}

View File

@ -0,0 +1,23 @@
{
"cniVersion": "0.3.1",
"name": "network-chain-test",
"plugins": [
{
"type": "bridge",
"bridge": "test-bridge-0",
"isDefaultGateway": true,
"ipam": {
"type": "host-local",
"subnet": "10.11.2.0/24",
"dataDir": "/tmp/foo"
}
},
{
"type": "bandwidth",
"ingressRate": 8000,
"ingressBurst": 16000,
"egressRate": 8000,
"egressBurst": 16000
}
]
}