You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/book/src/clusteropenstack/configuration.md
+69-5Lines changed: 69 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -310,9 +310,6 @@ spec:
310
310
ports:
311
311
- network:
312
312
id: <your-network-id>
313
-
nameSuffix: <your-port-name>
314
-
description: <your-custom-port-description>
315
-
vnicType: normal
316
313
fixedIPs:
317
314
- subnet:
318
315
id: <your-subnet-id>
@@ -322,6 +319,9 @@ spec:
322
319
tags:
323
320
- tag1
324
321
- tag2
322
+
nameSuffix: <your-port-name>
323
+
description: <your-custom-port-description>
324
+
vnicType: normal
325
325
securityGroups:
326
326
- <your-security-group-id>
327
327
profile:
@@ -331,7 +331,70 @@ spec:
331
331
332
332
Any such ports are created in addition to ports used for connections to networks or subnets.
333
333
334
-
Also, `port security` can be applied to specific port to enable/disable the `port security` on that port; When not set, it takes the value of the corresponding field at the network level.
334
+
### Port network and IP addresses
335
+
336
+
Together, `network` and `fixedIPs` define the network a port will be created on, and the addresses which will be assigned to the port on that network.
337
+
338
+
`network`is a filter which uniquely describes the Neutron network the port will be created be on. Machine creation will fail if the result is empty or not unique. If a network `id` is specified in the filter then no separate OpenStack query is required. This has the advantages of being both faster and unambiguous in all circumstances, so it is the preferred way to specify a network where possible.
339
+
340
+
The available fields are described in [the CRD](https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io/OpenStackMachine/[email protected]#spec-ports-network).
341
+
342
+
If `network` is not specified at all, it may be possible to infer the network from any uniquely defined subnets in `fixedIPs`. As this may result in additional OpenStack queries and the potential for ambiguity is greater, this is not recommended.
343
+
344
+
`fixedIPs`describes a list of addresses from the target `network` which will be allocated to the port. A `fixedIP` is either a specific `ipAddress`, a `subnet` from which an ip address will be allocated, or both. If only `ipAddress` is specified, it must be valid in at least one of the subnets defined in the current network. If both are defined, `ipAddress` must be valid in the specified subnet.
345
+
346
+
`subnet`is a filter which uniquely describe the Neutron subnet an address will be allocated from. Its operation is analogous to `network`, described above.
347
+
348
+
`fixedIPs`, including all fields available in the `subnet` filter, are described in [the CRD](https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io/OpenStackMachine/[email protected]#spec-ports-fixedIPs).
349
+
350
+
If no `fixedIPs` are specified, the port will get an address from every subnet in the network.
351
+
352
+
#### Examples
353
+
354
+
A single explicit network with a single explicit subnet.
355
+
```yaml
356
+
ports:
357
+
- tags:
358
+
- control-plane
359
+
network:
360
+
id: 0686143b-f0a7-481a-86f5-cc1f8ccde692
361
+
fixedIPs:
362
+
- subnet:
363
+
id: a5e50a9c-58f9-4b6f-b8ee-2e7b4e4414ee
364
+
```
365
+
366
+
No network or fixed IPs: the port will be created on the cluster default network, and will get a single address from the cluster default subnet.
367
+
```yaml
368
+
ports:
369
+
- tags:
370
+
- control-plane
371
+
```
372
+
373
+
Network and subnet are specified by filter. They will be looked up. Note that this is not as efficient or reliable as specifying the network by `id`.
374
+
```yaml
375
+
ports:
376
+
- tags:
377
+
- storage
378
+
network:
379
+
name: storage-network
380
+
fixedIPs:
381
+
- subnet:
382
+
name: storage-subnet
383
+
```
384
+
385
+
No network, but a fixed IP with a subnet. The network will be inferred from the network of the subnet. Note that this is not as efficient or reliable as specifying the network explicitly.
386
+
```yaml
387
+
ports:
388
+
- tags:
389
+
- control-plane
390
+
fixedIPs:
391
+
- subnet:
392
+
id: a5e50a9c-58f9-4b6f-b8ee-2e7b4e4414ee
393
+
```
394
+
395
+
### Port Security
396
+
397
+
`port security`can be applied to specific port to enable/disable the `port security` on that port; When not set, it takes the value of the corresponding field at the network level.
0 commit comments