Skip to content

Commit 0eb9656

Browse files
authored
Merge pull request #89196 from dfitzmau/OCPBUGS-51188
OCPBUGS#51188: Added note to metallb doc about single IP address
2 parents 4994489 + 5dd40e4 commit 0eb9656

File tree

3 files changed

+28
-16
lines changed

3 files changed

+28
-16
lines changed

modules/nw-metallb-addresspool-cr.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The default value is `true`.
4545

4646
|`spec.avoidBuggyIPs`
4747
|`boolean`
48-
|Optional: This ensures when enabled that IP addresses ending .0 and .255 are not allocated from the pool. The default value is `false`. Some older consumer network equipment mistakenly block IP addresses ending in .0 and .255.
48+
|Optional: This ensures when enabled that IP addresses ending `.0` and `.255` are not allocated from the pool. The default value is `false`. Some older consumer network equipment mistakenly block IP addresses ending in `.0` and `.255`.
4949

5050
|===
5151

modules/nw-metallb-configure-address-pool.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ As a cluster administrator, you can add address pools to your cluster to control
77
.Prerequisites
88

99
* Install the OpenShift CLI (`oc`).
10-
1110
* Log in as a user with `cluster-admin` privileges.
1211
1312
.Procedure
@@ -27,6 +26,7 @@ spec:
2726
addresses:
2827
- 203.0.113.1-203.0.113.10
2928
- 203.0.113.65-203.0.113.75
29+
# ...
3030
----
3131
<1> This label assigned to the `IPAddressPool` can be referenced by the `ipAddressPoolSelectors` in the `BGPAdvertisement` CRD to associate the `IPAddressPool` with the advertisement.
3232

@@ -39,7 +39,7 @@ $ oc apply -f ipaddresspool.yaml
3939

4040
.Verification
4141

42-
* View the address pool:
42+
. View the address pool by entering the following command:
4343
+
4444
[source,terminal]
4545
----
@@ -65,4 +65,4 @@ Spec:
6565
Events: <none>
6666
----
6767

68-
Confirm that the address pool name, such as `doc-example`, and the IP address ranges appear in the output.
68+
. Confirm that the address pool name, such as `doc-example`, and the IP address ranges exist in the output.

modules/nw-metallb-example-addresspool.adoc

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
//
33
// * networking/metallb/metallb-configure-address-pools.adoc
44

5+
:_mod-docs-content-type: REFERENCE
56
[id="nw-metallb-example-addresspool_{context}"]
67
= Example address pool configurations
78

9+
The following examples show address pool configurations for specific scenarios.
10+
811
== Example: IPv4 and CIDR ranges
912

10-
You can specify a range of IP addresses in CIDR notation.
11-
You can combine CIDR notation with the notation that uses a hyphen to separate lower and upper bounds.
13+
You can specify a range of IP addresses in classless inter-domain routing (CIDR) notation. You can combine CIDR notation with the notation that uses a hyphen to separate lower and upper bounds.
1214

1315
[source,yaml]
1416
----
@@ -22,13 +24,14 @@ spec:
2224
- 192.168.100.0/24
2325
- 192.168.200.0/24
2426
- 192.168.255.1-192.168.255.5
27+
# ...
2528
----
2629

27-
== Example: Reserve IP addresses
30+
== Example: Assign IP addresses
2831

29-
You can set the `autoAssign` field to `false` to prevent MetalLB from automatically assigning the IP addresses from the pool.
30-
When you add a service, you can request a specific IP address from the pool or you can specify the pool name in an annotation to request any IP address from the pool.
32+
You can set the `autoAssign` field to `false` to prevent MetalLB from automatically assigning IP addresses from the address pool. You can then assign a single IP address or multiple IP addresses from an IP address pool. To assign an IP address, append the `/32` CIDR notation to the target IP address in the `spec.addresses` parameter. This setting ensures that only the specific IP address is avilable for assignment, leaving non-reserved IP addresses for application use.
3133

34+
.Example `IPAddressPool` CR that assigns multiple IP addresses
3235
[source,yaml]
3336
----
3437
apiVersion: metallb.io/v1beta1
@@ -38,17 +41,22 @@ metadata:
3841
namespace: metallb-system
3942
spec:
4043
addresses:
41-
- 10.0.100.0/28
44+
- 192.168.100.1/32
45+
- 192.168.200.1/32
4246
autoAssign: false
47+
# ...
4348
----
4449

50+
[NOTE]
51+
====
52+
When you add a service, you can request a specific IP address from the address pool or you can specify the pool name in an annotation to request any IP address from the pool.
53+
====
54+
4555
== Example: IPv4 and IPv6 addresses
4656

47-
You can add address pools that use IPv4 and IPv6.
48-
You can specify multiple ranges in the `addresses` list, just like several IPv4 examples.
57+
You can add address pools that use IPv4 and IPv6. You can specify multiple ranges in the `addresses` list, just like several IPv4 examples.
4958

50-
Whether the service is assigned a single IPv4 address, a single IPv6 address, or both is determined by how you add the service.
51-
The `spec.ipFamilies` and `spec.ipFamilyPolicy` fields control how IP addresses are assigned to the service.
59+
Whether the service is assigned a single IPv4 address, a single IPv6 address, or both is determined by how you add the service. The `spec.ipFamilies` and `spec.ipFamilyPolicy` fields control how IP addresses are assigned to the service.
5260

5361
[source,yaml]
5462
----
@@ -59,11 +67,14 @@ metadata:
5967
namespace: metallb-system
6068
spec:
6169
addresses:
62-
- 10.0.100.0/28
70+
- 10.0.100.0/28 <1>
6371
- 2002:2:2::1-2002:2:2::100
72+
# ...
6473
----
74+
<1> Where `10.0.100.0/28` is the local network IP address followed by the `/28` network prefix.
6575

6676
== Example: Assign IP address pools to services or namespaces
77+
6778
You can assign IP addresses from an `IPAddressPool` to services and namespaces that you specify.
6879

6980
If you assign a service or namespace to more than one IP address pool, MetalLB uses an available IP address from the higher-priority IP address pool. If no IP addresses are available from the assigned IP address pools with a high priority, MetalLB uses available IP addresses from an IP address pool with lower priority or no priority.
@@ -96,7 +107,8 @@ spec:
96107
- key: security
97108
operator: In
98109
values:
99-
- S1
110+
- S1
111+
# ...
100112
----
101113
<1> Assign a priority to the address pool. A lower number indicates a higher priority.
102114
<2> Assign one or more namespaces to the IP address pool in a list format.

0 commit comments

Comments
 (0)