Skip to content

Commit

Permalink
Metallb --lb-class cmd arg to support multiple LoadBalancer implement…
Browse files Browse the repository at this point in the history
…ations (#10550)

* metallb --lb-class cmd arg to support multiple load balancer implementations

* removed loadbalancer_class from metallb_config; metallb_loadbalancer_class in role defaults
  • Loading branch information
Seal1998 authored Nov 8, 2023
1 parent b3f6d05 commit 6305dd3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/kubernetes-apps/metallb/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ metallb_speaker_tolerations:
key: node-role.kubernetes.io/control-plane
operator: Exists
metallb_controller_tolerations: []
metallb_loadbalancer_class: ""
6 changes: 6 additions & 0 deletions roles/kubernetes-apps/metallb/templates/metallb.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -1724,6 +1724,9 @@ spec:
- args:
- --port={{ metallb_port }}
- --log-level={{ metallb_log_level }}
{% if metallb_loadbalancer_class != "" %}
- --lb-class={{ metallb_loadbalancer_class }}
{% endif %}
env:
- name: METALLB_ML_SECRET_NAME
value: memberlist
Expand Down Expand Up @@ -1814,6 +1817,9 @@ spec:
- args:
- --port={{ metallb_port }}
- --log-level={{ metallb_log_level }}
{% if metallb_loadbalancer_class != "" %}
- --lb-class={{ metallb_loadbalancer_class }}
{% endif %}
env:
- name: METALLB_NODE_NAME
valueFrom:
Expand Down

0 comments on commit 6305dd3

Please sign in to comment.