@@ -192,8 +192,8 @@ metallb_enabled: true
192192metallb_speaker_enabled: "{{ metallb_enabled }}"
193193metallb_namespace: "metallb-system"
194194metallb_version: v0.13.9
195- # If your VPS provider does not support BGP (like Contabo), you should use MetalLB in Layer 2 mode, which relies on ARP/NDP for IP assignment
196- metallb_protocol: "layer2 "
195+ # Using BGP Layer 3 mode to prevent node elected bottleneck and distribute traffic more efficiently
196+ metallb_protocol: "layer3 "
197197metallb_port: "7472"
198198metallb_memberlist_port: "7946"
199199metallb_config:
@@ -225,34 +225,37 @@ metallb_config:
225225 # external:
226226 # ip_range: ${ externalIpRanges }
227227 # auto_assign: true
228- layer2:
229- # internal ip is for all services, external ip is for ingresses like nginx ingress controller
230- - internal
231- # - external
232- # layer3:
233- # defaults:
234- # peer_port: 179
235- # hold_time: 120s
236- # communities:
237- # vpn-only: "1234:1"
238- # NO_ADVERTISE: "65535:65282"
239- # metallb_peers:
240- # peer1:
241- # peer_address: 10.6.0.1
242- # peer_asn: 64512
243- # my_asn: 4200000000
244- # communities:
245- # - vpn-only
246- # address_pool:
247- # - pool1
248- # peer2:
249- # peer_address: 10.10.0.1
250- # peer_asn: 64513
251- # my_asn: 4200000000
252- # communities:
253- # - NO_ADVERTISE
254- # address_pool:
255- # - pool2
228+ # layer2:
229+ # # internal ip is for all services, external ip is for ingresses like nginx ingress controller
230+ # - internal
231+ # # - external
232+ layer3:
233+ defaults:
234+ peer_port: 179
235+ hold_time: 120s
236+ communities:
237+ # internal-only: Routes with this community are only advertised within the internal network
238+ # Useful for services that should only be accessible within your cluster or private network
239+ internal-only: "65535:65281"
240+ # no-external-advertise: Custom community that prevents routes from being advertised to external BGP peers
241+ # Useful for completely restricting the advertisement of certain service IPs
242+ no-external-advertise: "65535:65282"
243+ metallb_peers:
244+ # Configure BGP peers for each worker node to distribute traffic
245+ # Each worker node becomes a BGP peer, allowing for more efficient traffic distribution
246+ # This prevents the node elected bottleneck issue that occurs in Layer 2 mode
247+ # With BGP, each node can announce service IPs for pods running on that node
248+ ${ workers
249+ . map (
250+ ( worker ) => yaml `
251+ ${ worker . name } :
252+ peer_address: ${ worker . privateIp }
253+ peer_asn: 64512
254+ my_asn: 4200000000
255+ address_pool:
256+ - internal
257+ ` )
258+ . join ( "\n" ) }
256259
257260argocd_enabled: false
258261# argocd_version: v2.11.0
0 commit comments