mirror of
https://github.com/JamesTurland/JimsGarage.git
synced 2026-08-08 08:46:14 +00:00
The apply-manifests role rendered the IPAddressPool from a template using lb_pool_name, but applied the L2Advertisement from a hardcoded remote file where the pool name was baked in as 'first-pool'. Setting lb_pool_name to anything else left the L2Advertisement pointing at a non-existent pool, so MetalLB assigned LoadBalancer IPs but never advertised them (services got an external IP but were unreachable). Template the L2Advertisement locally from lb_pool_name, mirroring the IPAddressPool pattern, so both manifests always reference the same pool.
9 lines
154 B
Django/Jinja
9 lines
154 B
Django/Jinja
apiVersion: metallb.io/v1beta1
|
|
kind: L2Advertisement
|
|
metadata:
|
|
name: example
|
|
namespace: metallb-system
|
|
spec:
|
|
ipAddressPools:
|
|
- {{ lb_pool_name }}
|