Skip to content

Commit 97a8bf6

Browse files
committed
Update the global ip pool
Signed-off-by: Jian Wang <jian.wang@suse.com>
1 parent c89b016 commit 97a8bf6

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

docs/networking/ippool.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ To create a new IP pool:
3131
1. Specify the **Name** of the IP pool.
3232
1. Go to the **Range** tab to specify the **IP ranges** for the IP pool. You can add multiple IP ranges.
3333
![](/img/v1.2/networking/multiple-ranges.png)
34-
1. Go to the **Selector** tab to specify the **Scope** and **Priority** of the IP pool.
34+
1. Go to the **Selector** tab to specify the **Selector**, **Scope** and **Priority** of the IP pool.
3535
![](/img/v1.2/networking/ippool-scope.png)
3636
3737
When you operate from the Harvester UI, the `Scope` only includes `Namespace`. Click `Add Scope` to add new items.
@@ -47,17 +47,18 @@ The `Scope` includes `Project`, `Namespace` and `Guest Kubernetes Cluster`. For
4747
When a pool has only one `Scope` and each selects `All`, then this IP Pool is marked as `global` automatically.
4848

4949
## Selection policy
50+
5051
Each IP pool will have a specific range, and you can specify the corresponding requirements in the LB `annotations`. IP pools that meet the specified requirements will automatically assign IP addresses to LBs.
5152

5253
- LBs utilize the following annotations to express requirements (all annotations are optional):
53-
- `loadbalancer.harvesterhci.io/network` specifies the VM network the guest cluster nodes use.
54+
- `loadbalancer.harvesterhci.io/network` specifies the VM network the guest cluster nodes use, if it is not carried, the mutator selects the first multus network from the virtual machine instances of the the guest cluster.
5455
- `loadbalancer.harvesterhci.io/project` and `loadbalancer.harvesterhci.io/namespace` identify the project and namespace of the VMs that comprise the guest cluster.
5556
- `loadbalancer.harvesterhci.io/cluster` denotes the name of the guest cluster.
5657
- The IP pool has a selector, including network and scope, to match the requirements of the LB.
57-
- Network is a hard condition. The optional IP pool must match the value of the LB annotation `loadbalancer.harvesterhci.io/network`.
58+
- Network is a **hard condition**. The optional IP pool must match the value of the LB annotation `loadbalancer.harvesterhci.io/network`.
5859
- Every IP pool, except the global IP pool, has a unique scope different from others if its priority is `0`. The project, namespace, or cluster name of LBs should be in the scope of the IP pool if they want to get an IP from this pool.
5960
- `spec.selector.priority` specifies the priority of the IP Pool. The larger the number, the higher the priority. If the priority is not `0`, the value should differ. The priority helps you to migrate the old IP pool to the new one.
60-
- If the IP Pool has a scope that matches all projects, namespaces, and guest clusters, it's called a global IP pool, and only one global IP pool is allowed. If there is no IP pool matching the requirements of the LB, the IPAM will allocate an IP address from the global IP pool if it exists.
61+
- If the IP Pool has a scope that matches all projects, namespaces, and guest clusters, it's called a global IP pool, and only one global IP pool is allowed under one **Network**. If there is no IP pool matching the requirements of the LB, the IPAM will allocate an IP address from the global IP pool if it exists and matches the **Network**.
6162

6263
### Examples
6364
- **Example 1:** You wish to set up an IP pool within the range `192.168.100.0/24` for the `default` namespace. In this scenario, all load balancers within the `default` namespace will receive an IP address from this designated IP pool:
@@ -120,11 +121,12 @@ Each IP pool will have a specific range, and you can specify the corresponding r
120121
metadata:
121122
name: global-ip-pool
122123
labels:
123-
loadbalancer.harvesterhci.io/global-ip-pool: 'true' # Added by the controller automatically
124+
loadbalancer.harvesterhci.io/global-ip-pool: 'true' # Added by the mutator automatically
124125
spec:
125126
ranges:
126127
- subnet: 192.168.20.0/24
127128
selector:
129+
network: default/vlan1
128130
scope:
129131
- project: "*"
130132
namespace: "*"
@@ -149,3 +151,4 @@ Each IP pool will have a specific range, and you can specify the corresponding r
149151

150152
1. Be careful when creating global IP pool as one guest cluster might allocate too many IPs and starve other clusters. The pool can't be deleted if any of the IPs is still in use.
151153

154+
1. If an IP pool has empty `.spec.selector.network`, it will not be selected after v1.9.0 version.

0 commit comments

Comments
 (0)