From 7a1e078b9c768bae63b76ec55cadcd1e21f6f4be Mon Sep 17 00:00:00 2001 From: Daniel Nikolaidis Date: Mon, 23 Oct 2023 11:23:07 +0300 Subject: [PATCH] removed loadbalancer_class from metallb_config; metallb_loadbalancer_class in role defaults --- roles/kubernetes-apps/metallb/defaults/main.yml | 1 + roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/roles/kubernetes-apps/metallb/defaults/main.yml b/roles/kubernetes-apps/metallb/defaults/main.yml index 22e2935b25f..02f4e3cae94 100644 --- a/roles/kubernetes-apps/metallb/defaults/main.yml +++ b/roles/kubernetes-apps/metallb/defaults/main.yml @@ -13,3 +13,4 @@ metallb_speaker_tolerations: key: node-role.kubernetes.io/control-plane operator: Exists metallb_controller_tolerations: [] +metallb_loadbalancer_class: "" \ No newline at end of file diff --git a/roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 b/roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 index f3477ae1a21..608ad31cda4 100644 --- a/roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 +++ b/roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 @@ -1724,8 +1724,8 @@ 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 }} +{% if metallb_loadbalancer_class != "" %} + - --lb-class={{ metallb_loadbalancer_class }} {% endif %} env: - name: METALLB_ML_SECRET_NAME @@ -1817,8 +1817,8 @@ 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 }} +{% if metallb_loadbalancer_class != "" %} + - --lb-class={{ metallb_loadbalancer_class }} {% endif %} env: - name: METALLB_NODE_NAME