Skip to content

Commit

Permalink
feat(cilium): add bgp (#8621)
Browse files Browse the repository at this point in the history
  • Loading branch information
buroa authored Jan 7, 2025
1 parent 3e37b7f commit e539248
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 12 deletions.
4 changes: 4 additions & 0 deletions kubernetes/main/apps/kube-system/cilium/app/helm-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ bpf:
masquerade: true
preallocateMaps: true
tproxy: true
bgpControlPlane:
enabled: true
cgroup:
automount:
enabled: false
Expand Down Expand Up @@ -66,6 +68,8 @@ securityContext:
- IPC_LOCK
- SYS_ADMIN
- SYS_RESOURCE
- PERFMON
- BPF
- DAC_OVERRIDE
- FOWNER
- SETGID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./l2.yaml
- ./l3.yaml
- ./pool.yaml
12 changes: 0 additions & 12 deletions kubernetes/main/apps/kube-system/cilium/config/l2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,3 @@ spec:
nodeSelector:
matchLabels:
kubernetes.io/os: linux
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/cilium.io/ciliumloadbalancerippool_v2alpha1.json
apiVersion: cilium.io/v2alpha1
kind: CiliumLoadBalancerIPPool
metadata:
name: l2-pool
spec:
allowFirstLastIPs: "Yes"
blocks:
- # Controller VIP: 192.168.42.120
start: 192.168.42.121
stop: 192.168.42.149
22 changes: 22 additions & 0 deletions kubernetes/main/apps/kube-system/cilium/config/l3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/cilium.io/ciliumbgppeeringpolicy_v2alpha1.json
apiVersion: cilium.io/v2alpha1
kind: CiliumBGPPeeringPolicy
metadata:
name: l3-policy
spec:
nodeSelector:
matchLabels:
kubernetes.io/os: linux
virtualRouters:
- localASN: 64514
exportPodCIDR: false
serviceSelector:
matchExpressions:
- key: thisFakeSelector
operator: NotIn
values:
- will-match-and-announce-all-services
neighbors:
- peerAddress: 192.168.1.1/32
peerASN: 64513
12 changes: 12 additions & 0 deletions kubernetes/main/apps/kube-system/cilium/config/pool.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/cilium.io/ciliumloadbalancerippool_v2alpha1.json
apiVersion: cilium.io/v2alpha1
kind: CiliumLoadBalancerIPPool
metadata:
name: pool
spec:
allowFirstLastIPs: "Yes"
blocks:
- # Controller VIP: 192.168.42.120
start: 192.168.42.121
stop: 192.168.42.149

0 comments on commit e539248

Please sign in to comment.