You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
917 B

  1. ---
  2. apiVersion: v1
  3. kind: ConfigMap
  4. metadata:
  5. namespace: metallb-system
  6. name: config
  7. data:
  8. config: |
  9. {% if metallb_peers | length > 0 %}
  10. peers:
  11. {% for peer in metallb_peers %}
  12. - peer-address: {{ peer.peer_address }}
  13. peer-asn: {{ peer.peer_asn }}
  14. my-asn: {{ peer.my_asn }}
  15. {% endfor %}
  16. {% endif %}
  17. address-pools:
  18. - name: loadbalanced
  19. protocol: {{ metallb_protocol }}
  20. addresses:
  21. {% for ip_range in metallb_ip_range %}
  22. - {{ ip_range }}
  23. {% endfor %}
  24. {% if metallb_additional_address_pools is defined %}{% for pool in metallb_additional_address_pools %}
  25. - name: {{ pool }}
  26. protocol: {{ metallb_additional_address_pools[pool].protocol }}
  27. addresses:
  28. {% for ip_range in metallb_additional_address_pools[pool].ip_range %}
  29. - {{ ip_range }}
  30. {% endfor %}
  31. auto-assign: {{ metallb_additional_address_pools[pool].auto_assign }}
  32. {% endfor %}
  33. {% endif %}