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) -}}