mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-01 09:38:12 -03:30
Support Calico advertisement of MetalLB LoadBalancer IPs (#7593)
* add initial MetalLB docs * metallb allow disabling the deployment of the metallb speaker * calico>=3.18 allow using calico to advertise service loadbalancer IPs * Document the use of MetalLB and Calico * clean MetalLB docs
This commit is contained in:
@@ -29,6 +29,9 @@ global_as_num: "64512"
|
||||
# Advertise Service External IPs
|
||||
calico_advertise_service_external_ips: []
|
||||
|
||||
# Adveritse Service LoadBalancer IPs
|
||||
calico_advertise_service_loadbalancer_ips: []
|
||||
|
||||
# Limits for apps
|
||||
calico_node_memory_limit: 500M
|
||||
calico_node_cpu_limit: 300m
|
||||
|
||||
@@ -188,6 +188,12 @@
|
||||
with_items: "{{ calico_advertise_service_external_ips }}"
|
||||
run_once: yes
|
||||
|
||||
- name: Populate Service LoadBalancer IPs
|
||||
set_fact:
|
||||
_service_loadbalancer_ips: "{{ _service_loadbalancer_ips|default([]) + [ {'cidr': item} ] }}"
|
||||
with_items: "{{ calico_advertise_service_loadbalancer_ips }}"
|
||||
run_once: yes
|
||||
|
||||
- name: "Determine nodeToNodeMesh needed state"
|
||||
set_fact:
|
||||
nodeToNodeMeshEnabled: "false"
|
||||
@@ -213,6 +219,7 @@
|
||||
{% if not calico_no_global_as_num|default(false) %}"asNumber": {{ global_as_num }},{% endif %}
|
||||
"nodeToNodeMeshEnabled": {{ nodeToNodeMeshEnabled|default('true') }} ,
|
||||
{% if calico_advertise_cluster_ips|default(false) %}"serviceClusterIPs": [{"cidr": "{{ kube_service_addresses }}" }],{% endif %}
|
||||
{% if calico_version is version('v3.18.0', '>') and calico_advertise_service_loadbalancer_ips|length > 0 %}"serviceLoadBalancerIPs": {{ _service_loadbalancer_ips }},{% endif %}
|
||||
"serviceExternalIPs": {{ _service_external_ips|default([]) }} }}
|
||||
changed_when: false
|
||||
when:
|
||||
|
||||
Reference in New Issue
Block a user