Skip to content

Commit 19de388

Browse files
committed
Adds whereabouts IPAM CNI and route-override usage descriptions
1 parent d0f2538 commit 19de388

File tree

1 file changed

+90
-1
lines changed

1 file changed

+90
-1
lines changed

modules/nw-multus-ipam-object.adoc

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ endif::[]
2323

2424
The IP address management (IPAM) Container Network Interface (CNI) plug-in manages IP address assignment for other CNI plug-ins. You can configure ipam for either static IP address assignment or dynamic IP address assignment by using DHCP. The DHCP server you specify must be reachable from the additional network.
2525

26+
Alternatively for dynamic IP addressment without an available DHCP server, you may use the Whereabouts IPAM CNI plugin.
27+
2628
ifdef::json[]
2729
The following JSON configuration object describes the parameters that you can set.
2830
endif::json[]
@@ -110,7 +112,7 @@ You can configure ipam for static IP address assignment:
110112
----
111113

112114
[id="nw-multus-dynamic-example_{context}"]
113-
== Dynamic IP address assignment configuration example
115+
== Dynamic IP address assignment configuration example using DHCP
114116

115117
You can configure ipam for DHCP:
116118

@@ -141,6 +143,40 @@ cannot specify any additional parameters if you specify a value of `DHCP`.
141143
<2> If you set the `type` parameter to `static`, then provide the
142144
`staticIPAMConfig` parameter.
143145

146+
[id="nw-multus-dynamic-whereabouts-example_{context}"]
147+
== Dynamic IP address assignment configuration example using Whereabouts
148+
149+
Whereabouts is an IPAM CNI plugin that can be used for dynamic IP address assignment
150+
without having to rely on a DHCP server.
151+
152+
You can configure ipam for Whereabouts:
153+
154+
.Whereabouts ipam configuration JSON
155+
[source,json]
156+
----
157+
{
158+
"ipam": {
159+
"type": "whereabouts", <1>
160+
"range": "192.0.2.192/27", <2>
161+
"exclude": [ <3>
162+
"192.0.2.192/30",
163+
"192.0.2.196/32"
164+
],
165+
}
166+
}
167+
----
168+
169+
<1> Specify `type` with a value of `whereabouts` to use Whereabouts for IPAM.
170+
<2> The `range` parameter is an IP address and range in CIDR notation, IP addresses will be
171+
assigned from within this range of addresses.
172+
<3> The `exclude` parameter is a list of IP addresses and ranges in CIDR notation,
173+
IP address ranges listed in `exclude` will not be assigned. Optional.
174+
175+
[NOTE]
176+
=====
177+
Whereabouts can be used for both IPv4 and IPv6 addresses.
178+
=====
179+
144180
[id="nw-multus-static-config_{context}"]
145181
== Static ipam configuration YAML
146182

@@ -238,6 +274,59 @@ The following example shows an ipam configuration for DHCP:
238274
ipamConfig:
239275
type: DHCP
240276
----
277+
278+
[id="nw-multus-route-override-example_{context}"]
279+
== Specifying routes using the route-override CNI plugin
280+
281+
In addition to assigning IP addresses to pods, you can also override any routing on a given pod.
282+
283+
The "route-override" CNI plugin is used to accomplish this, and is used as a "chained plugin". To chain
284+
CNI plugins, you specify a list of CNI configurations. Only some plugins (such as route-override) can
285+
be utilized in this fashion, and are typically used to add capabilities or alter properties of additional
286+
network interfaces.
287+
288+
289+
.Route-Override CNI chained CNI plug-in JSON configuration object
290+
[source,json]
291+
----
292+
{
293+
"cniVersion": "0.3.0",
294+
"name" : "exampleconfiguration",
295+
"plugins": [ <1>
296+
{
297+
"type": "...", <2>
298+
"ipam": {
299+
"type": "..."
300+
}
301+
},
302+
{
303+
"type" : "route-override", <3>
304+
"flushroutes" : true, <4>
305+
"addroutes": [ <5>
306+
{
307+
"dst": "192.168.10.0/24", <6>
308+
"gw": "10.1.254.254" <7>
309+
}],
310+
"delroutes": [ <8>
311+
{
312+
"dst": "192.168.0.0/24"
313+
}],
314+
"flushgateway": false, <9>
315+
}
316+
]
317+
}
318+
----
319+
320+
<1> When using chained plugins the `plugins` key should be a list of JSON objects
321+
<2> The first JSON object in the list will be the primary CNI plugin for the additional network.
322+
<3> The second JSON object should be set to `"type" : "route-override"` in order to alter routing. Required.
323+
<4> The `flushroutes` key, when set to true, will remove all existing routes from pods referencing this configuration. Optional.
324+
<5> The `addroutes` key is a list of JSON objects describing route destinations and gateways to be added. Optional.
325+
<6> The `dst` field in each `addroutes` object is the destination IP address and subnet mask in CIDR format.
326+
<7> The `gw` field is the gateway to set for each of the destination CIDR ranges. Optional.
327+
<8> The `delroutes` key is a list of JSON objects describing which destination routes to delete.
328+
<9> The `flushgateway` key when set to true, will remove the default gateway. Optional.
329+
241330
endif::yaml[]
242331

243332

0 commit comments

Comments
 (0)