Skip to content

Commit 7b1dce5

Browse files
committed
⚖️ introduce custom IP pools for cluster and local traffic policies
1 parent d7ba15b commit 7b1dce5

File tree

5 files changed

+30
-7
lines changed

5 files changed

+30
-7
lines changed

flux/apps/pihole.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ spec:
1919
serviceDns:
2020
mixedService: true
2121
type: LoadBalancer
22-
externalTrafficPolicy: Cluster
22+
externalTrafficPolicy: Local
2323
annotations:
24-
metallb.io/allow-shared-ip: default
24+
metallb.io/address-pool: dns-vip
2525
serviceDhcp:
2626
enabled: false
2727
ingress:

flux/apps/unifi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ spec:
131131
type: LoadBalancer
132132
annotations:
133133
metallb.io/allow-shared-ip: default
134+
metallb.io/address-pool: default-vip
134135
ports:
135136
controller:
136137
port: 8080

flux/system/app-controllers/microsocks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ spec:
3030
type: LoadBalancer
3131
annotations:
3232
metallb.io/allow-shared-ip: default
33+
metallb.io/address-pool: default-vip
3334
ports:
3435
socks5:
3536
port: 1080

flux/system/app-controllers/nginx.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
- IPv6
2323
externalTrafficPolicy: Local
2424
annotations:
25-
metallb.io/allow-shared-ip: default
25+
metallb.io/address-pool: http-vip
2626
kind: Deployment
2727
metrics:
2828
enabled: true

flux/system/infrastructure-configs/metallb.yaml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,32 @@
22
apiVersion: metallb.io/v1beta1
33
kind: IPAddressPool
44
metadata:
5-
name: service-vip
5+
name: dns-vip
66
namespace: metallb-system
77
spec:
88
addresses:
9-
- 192.168.1.220/32
10-
- fd08:192:168:1::220/128
9+
- 192.168.1.3/32
10+
- fd08:192:168:1::3/128
11+
---
12+
apiVersion: metallb.io/v1beta1
13+
kind: IPAddressPool
14+
metadata:
15+
name: http-vip
16+
namespace: metallb-system
17+
spec:
18+
addresses:
19+
- 192.168.1.4/32
20+
- fd08:192:168:1::4/128
21+
---
22+
apiVersion: metallb.io/v1beta1
23+
kind: IPAddressPool
24+
metadata:
25+
name: default-vip
26+
namespace: metallb-system
27+
spec:
28+
addresses:
29+
- 192.168.1.5/32
30+
- fd08:192:168:1::5/128
1131
---
1232
apiVersion: metallb.io/v1beta1
1333
kind: L2Advertisement
@@ -16,6 +36,7 @@ metadata:
1636
namespace: metallb-system
1737
spec:
1838
ipAddressPools:
19-
- service-vip
39+
- local-vip
40+
- cluster-vip
2041
interfaces:
2142
- eth0

0 commit comments

Comments
 (0)