diff --git a/roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 b/roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 index eab386ff8f8..f3477ae1a21 100644 --- a/roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 +++ b/roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 @@ -1724,6 +1724,9 @@ spec: - args: - --port={{ metallb_port }} - --log-level={{ metallb_log_level }} +{% if 'loadbalancer_class' in metallb_config.keys() and metallb_config.loadbalancer_class != "" %} + - --lb-class={{ metallb_config.loadbalancer_class }} +{% endif %} env: - name: METALLB_ML_SECRET_NAME value: memberlist @@ -1814,6 +1817,9 @@ spec: - args: - --port={{ metallb_port }} - --log-level={{ metallb_log_level }} +{% if 'loadbalancer_class' in metallb_config.keys() and metallb_config.loadbalancer_class != "" %} + - --lb-class={{ metallb_config.loadbalancer_class }} +{% endif %} env: - name: METALLB_NODE_NAME valueFrom: