From a296c6a23935e00f9b618e5634bc9d6371bf5f08 Mon Sep 17 00:00:00 2001 From: Parsa Gheiratian <91082495+vexsx@users.noreply.github.com> Date: Mon, 26 Oct 2026 19:16:11 +0330 Subject: [PATCH] =?UTF-8?q?fix(metallb):=20wire=20metallb=5Fcontroller=5Ft?= =?UTF-8?q?olerations=20into=20controller=20Dep=E2=80=A6=20(#13384)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(metallb): wire metallb_controller_tolerations into controller Deployment The metallb_controller_tolerations default was introduced in #7334 along with template wiring, but the wiring was lost in #9120 when the manifest was regenerated for the CRD switch. Since then the variable has been defined in roles/kubernetes-apps/metallb/defaults/main.yml but silently ignored: only metallb_config.controller.tolerations reached the controller Deployment, while the speaker DaemonSet still honors both metallb_speaker_tolerations and its metallb_config override. Merge the role default with the optional metallb_config override, and only emit the tolerations key when the merged list is non-empty, so current rendering is unchanged for users who set neither variable. Signed-off-by: vexsx * Update metallb.yaml.j2 simplify metallb_controller_tolerations merge using default([]) --------- Signed-off-by: vexsx --- roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 b/roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 index 9aca2cbc7..e96484b6a 100644 --- a/roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 +++ b/roles/kubernetes-apps/metallb/templates/metallb.yaml.j2 @@ -1752,9 +1752,9 @@ spec: - mountPath: /tmp/k8s-webhook-server/serving-certs name: cert readOnly: true -{% if metallb_config.controller is defined and metallb_config.controller.tolerations is defined %} +{% set controller_tolerations = metallb_controller_tolerations + (metallb_config.controller.tolerations | default([])) %}{% if controller_tolerations %} tolerations: - {{ metallb_config.controller.tolerations | to_nice_yaml(indent=2) | indent(width=8) }} + {{ controller_tolerations | to_nice_yaml(indent=2) | indent(width=8) }} {%- endif %} nodeSelector: {{ metallb_controller_nodeselector | to_nice_yaml | indent(width=8) -}}