mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-08 01:47:37 -02:30
added the ability to define and deploy multiple address pools to metallb (#4757)
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
5e80603bbb
commit
e6fb686156
@@ -6,5 +6,7 @@ This playbook aims to automate [this](https://metallb.universe.tf/tutorial/layer
|
|||||||
|
|
||||||
## Install
|
## Install
|
||||||
```
|
```
|
||||||
|
Defaults can be found in contrib/metallb/roles/provision/defaults/main.yml. You can override the defaults by copying the contents of this file to somewhere in inventory/mycluster/group_vars such as inventory/mycluster/groups_vars/k8s-cluster/addons.yml and making any adjustments as required.
|
||||||
|
|
||||||
ansible-playbook --ask-become -i inventory/sample/hosts.ini contrib/metallb/metallb.yml
|
ansible-playbook --ask-become -i inventory/sample/hosts.ini contrib/metallb/metallb.yml
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
---
|
---
|
||||||
metallb:
|
metallb:
|
||||||
ip_range: "10.5.0.50-10.5.0.99"
|
ip_range: "10.5.0.50-10.5.0.99"
|
||||||
|
protocol: "layer2"
|
||||||
|
# additional_address_pools:
|
||||||
|
# kube_service_pool:
|
||||||
|
# ip_range: "10.5.1.50-10.5.1.99"
|
||||||
|
# protocol: "layer2"
|
||||||
|
# auto_assign: false
|
||||||
limits:
|
limits:
|
||||||
cpu: "100m"
|
cpu: "100m"
|
||||||
memory: "100Mi"
|
memory: "100Mi"
|
||||||
|
|||||||
@@ -8,6 +8,14 @@ data:
|
|||||||
config: |
|
config: |
|
||||||
address-pools:
|
address-pools:
|
||||||
- name: loadbalanced
|
- name: loadbalanced
|
||||||
protocol: layer2
|
protocol: {{ metallb.protocol }}
|
||||||
addresses:
|
addresses:
|
||||||
- {{ metallb.ip_range }}
|
- {{ metallb.ip_range }}
|
||||||
|
{% if metallb.additional_address_pools is defined %}{% for pool in metallb.additional_address_pools %}
|
||||||
|
- name: {{ pool }}
|
||||||
|
protocol: {{ metallb.additional_address_pools[pool].protocol }}
|
||||||
|
addresses:
|
||||||
|
- {{ metallb.additional_address_pools[pool].ip_range }}
|
||||||
|
auto-assign: {{ metallb.additional_address_pools[pool].auto_assign }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user