From 95ca9d393a8df7bfcb2153636c9007e60acd5c77 Mon Sep 17 00:00:00 2001 From: Tom Denham Date: Thu, 9 Feb 2017 14:03:47 -0800 Subject: [PATCH] Update with feedback --- CONVENTIONS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONVENTIONS.md b/CONVENTIONS.md index 589d9d62..82857533 100644 --- a/CONVENTIONS.md +++ b/CONVENTIONS.md @@ -29,14 +29,14 @@ Dynamic information (i.e. data that a runtime fills out) should be placed in a ` | Area | Purpose| Spec and Example | Runtime implementations | Plugin Implementations | | ------ | ------ | ------ | ------ | ------ | ------ | -| port mappings | Pass mapping from ports on the host to ports in the container network namespace. | Runtimes should receive the follow plugin config
"runtime_config": {port_mappings": []} 
Runtimes should fill in the actual port mappings when the config is passed to plugins e.g.
"runtime_config": {
"port_mappings" : [
{ "host_port": 8080, "container_port": 80, "protocol": "tcp" },
{ "host_port": 8000, "container_port": 8001, "protocol": "udp" }
]
}
| none | none | +| port mappings | Pass mapping from ports on the host to ports in the container network namespace. | Operators can ask runtimes to pass port mapping information to plugins, by setting the following in the CNI config
"capabilities": {port_mappings": true} 
Runtimes should fill in the actual port mappings when the config is passed to plugins. It should be placed in a new section of the config "runtime_config" e.g.
"runtime_config": {
"port_mappings" : [
{ "host_port": 8080, "container_port": 80, "protocol": "tcp" },
{ "host_port": 8000, "container_port": 8001, "protocol": "udp" }
]
}
| none | none | For example, the configuration for a port mapping plugin might look like this to an operator (it should be included as part of a [network configuration list](https://github.com/containernetworking/cni/blob/master/SPEC.md#network-configuration-lists). ```json { "name" : "ExamplePlugin", "type" : "port-mapper", - "runtime_config": {"port_mappings": []} + "capabilities": {"port_mappings": true} } ```