Skip to content

Commit

Permalink
Add defined for parent variable
Browse files Browse the repository at this point in the history
Signed-off-by: Jeroen Rijken <jeroen.rijken@xs4all.nl>
  • Loading branch information
Jeroen0494 committed May 26, 2023
1 parent 60e464e commit 720b393
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions roles/kubernetes-apps/metallb/templates/metallb.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -1765,13 +1765,13 @@ spec:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
readOnly: true
{% if metallb_config.controller.tolerations is defined %}
{% if metallb_config.controller is defined and metallb_config.controller.tolerations is defined %}
tolerations:
{{ metallb_config.controller.tolerations | to_nice_yaml(indent=2) | indent(width=8) }}
{%- endif %}
nodeSelector:
{{ metallb_controller_nodeselector | to_nice_yaml | indent(width=8) -}}
{% if metallb_config.controller.nodeselector is defined %}
{% if metallb_config.controller is defined and metallb_config.controller.nodeselector is defined %}
{{ metallb_config.controller.nodeselector | to_nice_yaml | indent(width=8) -}}
{%- endif %}
securityContext:
Expand Down Expand Up @@ -1873,15 +1873,15 @@ spec:
hostNetwork: true
nodeSelector:
{{ metallb_speaker_nodeselector | to_nice_yaml | indent(width=8) -}}
{% if metallb_config.speaker.nodeselector is defined %}
{% if metallb_config.speaker is defined and metallb_config.speaker.nodeselector is defined %}
{{ metallb_config.speaker.nodeselector | to_nice_yaml | indent(width=8) -}}
{%- endif %}

serviceAccountName: speaker
terminationGracePeriodSeconds: 2
tolerations:
{{ metallb_speaker_tolerations | to_nice_yaml(indent=2) | indent(width=8) -}}
{% if metallb_config.speaker.tolerations is defined %}
{% if metallb_config.speaker is defined and metallb_config.speaker.tolerations is defined %}
{{ metallb_config.speaker.tolerations | to_nice_yaml(indent=2) | indent(width=8) -}}
{% endif %}
{% endif %}
Expand Down

0 comments on commit 720b393

Please sign in to comment.