2023-04-14 16:14:41 +08:00
|
|
|
#jinja2: trim_blocks: True, lstrip_blocks: True
|
|
|
|
# yamllint disable-file
|
|
|
|
---
|
|
|
|
|
|
|
|
# Create all pools
|
|
|
|
{% for pool_name, pool in metallb_config.address_pools.items() %}
|
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: metallb.io/v1beta1
|
|
|
|
kind: IPAddressPool
|
|
|
|
metadata:
|
|
|
|
namespace: metallb-system
|
|
|
|
name: "{{ pool_name }}"
|
|
|
|
spec:
|
|
|
|
addresses:
|
|
|
|
{% for ip_range in pool.ip_range %}
|
|
|
|
- "{{ ip_range }}"
|
|
|
|
{% endfor %}
|
2023-09-22 11:29:49 +08:00
|
|
|
autoAssign: {{ pool.auto_assign | default(true) }}
|
|
|
|
avoidBuggyIPs: {{ pool.avoid_buggy_ips | default(false) }}
|
2023-04-14 16:14:41 +08:00
|
|
|
|
|
|
|
{% endfor %}
|