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
@@ -358,9 +358,6 @@ spec:
358
358
ports:
359
359
- network:
360
360
id: <your-network-id>
361
-
nameSuffix: <your-port-name>
362
-
description: <your-custom-port-description>
363
-
vnicType: normal
364
361
fixedIPs:
365
362
- subnet:
366
363
id: <your-subnet-id>
@@ -370,6 +367,9 @@ spec:
370
367
tags:
371
368
- tag1
372
369
- tag2
370
+
nameSuffix: <your-port-name>
371
+
description: <your-custom-port-description>
372
+
vnicType: normal
373
373
securityGroups:
374
374
- <your-security-group-id>
375
375
profile:
@@ -379,7 +379,70 @@ spec:
379
379
380
380
Any such ports are created in addition to ports used for connections to networks or subnets.
381
381
382
-
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.
382
+
### Port network and IP addresses
383
+
384
+
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.
385
+
386
+
`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.
387
+
388
+
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).
389
+
390
+
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.
391
+
392
+
`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.
393
+
394
+
`subnet`is a filter which uniquely describe the Neutron subnet an address will be allocated from. Its operation is analogous to `network`, described above.
395
+
396
+
`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).
397
+
398
+
If no `fixedIPs` are specified, the port will get an address from every subnet in the network.
399
+
400
+
#### Examples
401
+
402
+
A single explicit network with a single explicit subnet.
403
+
```yaml
404
+
ports:
405
+
- tags:
406
+
- control-plane
407
+
network:
408
+
id: 0686143b-f0a7-481a-86f5-cc1f8ccde692
409
+
fixedIPs:
410
+
- subnet:
411
+
id: a5e50a9c-58f9-4b6f-b8ee-2e7b4e4414ee
412
+
```
413
+
414
+
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.
415
+
```yaml
416
+
ports:
417
+
- tags:
418
+
- control-plane
419
+
```
420
+
421
+
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`.
422
+
```yaml
423
+
ports:
424
+
- tags:
425
+
- storage
426
+
network:
427
+
name: storage-network
428
+
fixedIPs:
429
+
- subnet:
430
+
name: storage-subnet
431
+
```
432
+
433
+
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.
434
+
```yaml
435
+
ports:
436
+
- tags:
437
+
- control-plane
438
+
fixedIPs:
439
+
- subnet:
440
+
id: a5e50a9c-58f9-4b6f-b8ee-2e7b4e4414ee
441
+
```
442
+
443
+
### Port Security
444
+
445
+
`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