2c87170ccf
* add metallb auto-assign property for main IP range & update addons.yml for sample inventory * add new line at the end of file roles\kubernetes-apps\metallb\defaults\main.yml * set default value for matallb_auto_assign = true
36 lines
1,003 B
Django/Jinja
36 lines
1,003 B
Django/Jinja
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
namespace: metallb-system
|
|
name: config
|
|
data:
|
|
config: |
|
|
{% if metallb_peers | length > 0 %}
|
|
peers:
|
|
{% for peer in metallb_peers %}
|
|
- peer-address: {{ peer.peer_address }}
|
|
peer-asn: {{ peer.peer_asn }}
|
|
my-asn: {{ peer.my_asn }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
address-pools:
|
|
- name: {{ metallb_pool_name }}
|
|
protocol: {{ metallb_protocol }}
|
|
addresses:
|
|
{% for ip_range in metallb_ip_range %}
|
|
- {{ ip_range }}
|
|
{% endfor %}
|
|
{% if matallb_auto_assign == false %}
|
|
auto-assign: false
|
|
{% endif %}
|
|
{% 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 %}
|