Skip to content

Commit 25aac98

Browse files
committed
feat(bgp): enable bgp in cilium and disable l2 announcements
Also change IPs off all services to a different subnet Signed-off-by: Vegard Hagen <[email protected]>
1 parent 5c14ae1 commit 25aac98

File tree

23 files changed

+116
-29
lines changed

23 files changed

+116
-29
lines changed

k8s/apps/dev/whoami/svc.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ metadata:
44
name: whoami
55
namespace: whoami
66
annotations:
7-
io.cilium/lb-ipam-ips: 192.168.1.223
7+
io.cilium/lb-ipam-ips: 172.20.10.200
8+
labels:
9+
bgp.cilium.io/advertise-service: default
10+
lb-ipam.cilium.io/ip-pool: default
811
spec:
912
type: LoadBalancer
1013
selector:

k8s/apps/external/proxmox/svc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ spec:
88
- name: https
99
protocol: TCP
1010
port: 443
11+
appProtocol: kubernetes.io/h2c
1112
targetPort: 8006

k8s/apps/external/truenas/svc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ spec:
88
- name: https
99
protocol: TCP
1010
port: 443
11+
appProtocol: kubernetes.io/h2c

k8s/apps/media/plex/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ configMapGenerator:
88
namespace: plex
99
literals:
1010
- TZ="Europe/Oslo"
11-
- PLEX_ADVERTISE_URL=https://plex.stonegarden.dev:443,http://192.168.1.228:32400
11+
- PLEX_ADVERTISE_URL=https://plex.stonegarden.dev:443
1212

1313
resources:
1414
- ns.yaml

k8s/apps/utils/torrent/svc-torrent.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ metadata:
44
name: torrent-torrent
55
namespace: torrent
66
annotations:
7-
io.cilium/lb-ipam-ips: 192.168.1.225
7+
io.cilium/lb-ipam-ips: 172.20.10.250
8+
labels:
9+
bgp.cilium.io/advertise-service: default
10+
lb-ipam.cilium.io/ip-pool: default
811
spec:
912
type: LoadBalancer
1013
selector:

k8s/infra/auth/authelia/cnpg-db.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spec:
2727
# metadata:
2828
# name: authelia-postgres-db
2929
# annotations:
30-
# io.cilium/lb-ipam-ips: 192.168.1.240
30+
# io.cilium/lb-ipam-ips: 172.20.10.241
3131
# spec:
3232
# type: LoadBalancer
3333
storage:

k8s/infra/auth/lldap/cnpg-db.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spec:
2727
# metadata:
2828
# name: lldap-postgres-db
2929
# annotations:
30-
# io.cilium/lb-ipam-ips: 192.168.1.241
30+
# io.cilium/lb-ipam-ips: 172.20.10.240
3131
# spec:
3232
# type: LoadBalancer
3333
storage:

k8s/infra/auth/lldap/svc.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ metadata:
44
name: lldap
55
namespace: lldap
66
annotations:
7-
io.cilium/lb-ipam-ips: 192.168.1.242
7+
io.cilium/lb-ipam-ips: 172.20.10.120
8+
labels:
9+
bgp.cilium.io/advertise-service: default
10+
lb-ipam.cilium.io/ip-pool: default
811
spec:
912
type: LoadBalancer
1013
# https://kubernetes.io/docs/concepts/services-networking/cluster-ip-allocation/
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: cilium.io/v2
2+
kind: CiliumBGPAdvertisement
3+
metadata:
4+
name: loadbalancer-services
5+
labels:
6+
bgp.cilium.io/advertise: loadbalancer-services
7+
spec:
8+
advertisements:
9+
- advertisementType: "Service"
10+
service:
11+
addresses:
12+
- LoadBalancerIP
13+
selector:
14+
matchLabels:
15+
bgp.cilium.io/advertise-service: default
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: cilium.io/v2
2+
kind: CiliumBGPClusterConfig
3+
metadata:
4+
name: cilium-unifi
5+
spec:
6+
nodeSelector:
7+
matchLabels:
8+
node-role.kubernetes.io/control-plane: ""
9+
bgpInstances:
10+
- name: "65200"
11+
localASN: 65200
12+
peers:
13+
- name: "ucg-max-65100"
14+
peerASN: 65100
15+
peerAddress: 172.20.10.1
16+
peerConfigRef:
17+
name: cilium-peer

0 commit comments

Comments
 (0)