mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-29 22:03:22 -02:30
fix(metallb): wire metallb_controller_tolerations into controller Dep… (#13384)
* 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 <p.gheiratian1382@yahoo.com> * Update metallb.yaml.j2 simplify metallb_controller_tolerations merge using default([]) --------- Signed-off-by: vexsx <p.gheiratian1382@yahoo.com>
This commit is contained in:
@@ -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) -}}
|
||||
|
||||
Reference in New Issue
Block a user