mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-26 11:50:15 +03:00
MetalLB as loadbalancer for on premise deployments (#3027)
* add metallb as loadbalancer for on premise deployments * improve configuration * add variables to DaemonSet
This commit is contained in:
committed by
Matthew Mosesohn
parent
ad33f71ac2
commit
9cc8ef4b91
16
contrib/metallb/roles/provision/tasks/main.yml
Normal file
16
contrib/metallb/roles/provision/tasks/main.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: "Kubernetes Apps | Lay Down MetalLB"
|
||||
become: true
|
||||
template: { src: "{{ item }}.j2", dest: "{{ kube_config_dir }}/{{ item }}" }
|
||||
with_items: ["metallb.yml", "metallb-config.yml"]
|
||||
register: "rendering"
|
||||
when:
|
||||
- "inventory_hostname == groups['kube-master'][0]"
|
||||
- name: "Kubernetes Apps | Install and configure MetalLB"
|
||||
kube:
|
||||
name: "MetalLB"
|
||||
filename: "{{ kube_config_dir }}/metallb.yml"
|
||||
state: "{{ item.changed | ternary('latest','present') }}"
|
||||
with_items: "{{ rendering.results }}"
|
||||
when:
|
||||
- "inventory_hostname == groups['kube-master'][0]"
|
||||
Reference in New Issue
Block a user