2020-06-29 22:11:59 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
namespace: metallb-system
|
|
|
|
name: config
|
|
|
|
data:
|
|
|
|
config: |
|
2020-08-27 06:15:03 +00:00
|
|
|
{% if metallb_peers | length > 0 %}
|
2020-08-05 08:52:40 +00:00
|
|
|
peers:
|
|
|
|
{% for peer in metallb_peers %}
|
|
|
|
- peer-address: {{ peer.peer_address }}
|
|
|
|
peer-asn: {{ peer.peer_asn }}
|
|
|
|
my-asn: {{ peer.my_asn }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2020-06-29 22:11:59 +00:00
|
|
|
address-pools:
|
2021-10-22 16:38:39 +00:00
|
|
|
- name: {{ metallb_pool_name }}
|
2020-06-29 22:11:59 +00:00
|
|
|
protocol: {{ metallb_protocol }}
|
|
|
|
addresses:
|
|
|
|
{% for ip_range in metallb_ip_range %}
|
|
|
|
- {{ ip_range }}
|
|
|
|
{% endfor %}
|
2021-11-16 13:06:27 +00:00
|
|
|
{% if matallb_auto_assign == false %}
|
|
|
|
auto-assign: false
|
|
|
|
{% endif %}
|
2020-06-29 22:11:59 +00:00
|
|
|
{% if metallb_additional_address_pools is defined %}{% for pool in metallb_additional_address_pools %}
|
|
|
|
- name: {{ pool }}
|
|
|
|
protocol: {{ metallb_additional_address_pools[pool].protocol }}
|
|
|
|
addresses:
|
|
|
|
{% for ip_range in metallb_additional_address_pools[pool].ip_range %}
|
|
|
|
- {{ ip_range }}
|
|
|
|
{% endfor %}
|
|
|
|
auto-assign: {{ metallb_additional_address_pools[pool].auto_assign }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|