Skip to content

Commit 125b2a6

Browse files
Felix Wischke (65278)wikkyk
authored andcommitted
docs/advanced-setups: add metric documentation
1 parent f34e4da commit 125b2a6

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docs/advanced-setups.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,38 @@ export SECONDARY_DNS_SERVERS="[8.8.8.8, 8.8.4.4]"
3636
export SECONDARY_BRIDGE=vmbr2
3737
```
3838

39+
### Multiple gateways
40+
If you have multiple gateways (especially without VRF devices), you may
41+
want to control gateway selection by inserting metrics.
42+
For this purpose, you can add a metric annotation to your pools:
43+
44+
```yaml
45+
apiVersion: ipam.cluster.x-k8s.io/v1alpha2
46+
kind: GlobalInClusterIPPool
47+
metadata:
48+
annotations:
49+
metric: "200"
50+
name: shared-inclusterippool
51+
spec:
52+
addresses: ${NODE_SECONDARY_IP_RANGES}
53+
prefix: ${SECONDARY_IP_PREFIX}
54+
gateway: ${SECONDARY_GATEWAY}
55+
```
56+
This annotation will be used when creating a netplan definition for a VM.
57+
58+
The metric of the default gateway can be controlled with the proxmoxcluster definition:
59+
```yaml
60+
[...]
61+
ipv4Config:
62+
addresses:
63+
- 10.10.0.70-10.10.0.79
64+
gateway: 10.10.0.1
65+
metric: 100
66+
prefix: 24
67+
```
68+
69+
Metrics are, like all network configuration, part of bootstrap, and will not reconcile.
70+
3971
#### Generate a Cluster
4072
4173
```bash

0 commit comments

Comments
 (0)