Skip to content

Commit

Permalink
Update tolerations
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen0494 committed Oct 21, 2022
1 parent ad80504 commit d9ea0bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
20 changes: 11 additions & 9 deletions docs/metallb.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ metallb_speaker_enabled: true
By default only the MetalLB BGP speaker is allowed to run on control plane nodes. If you have a single node cluster or a cluster where control plane are also worker nodes you may need to enable tolerations for the MetalLB controller:
```yaml
metallb_controller_tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Equal"
value: ""
effect: "NoSchedule"
- key: "node-role.kubernetes.io/control-plane"
operator: "Equal"
value: ""
effect: "NoSchedule"
metallb_config:
controller:
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Equal"
value: ""
effect: "NoSchedule"
- key: "node-role.kubernetes.io/control-plane"
operator: "Equal"
value: ""
effect: "NoSchedule"
```
## Pools
Expand Down
4 changes: 2 additions & 2 deletions roles/kubernetes-apps/metallb/templates/metallb.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -1550,9 +1550,9 @@ spec:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
readOnly: true
{% if metallb_controller_tolerations %}
{% if metallb_config.controller.tolerations %}
tolerations:
{{ metallb_controller_tolerations | to_nice_yaml(indent=2) | indent(width=8) }}
{{ metallb_config.controller.tolerations | to_nice_yaml(indent=2) | indent(width=8) }}
{% endif %}
{% if metallb_controller_nodeselector %}
nodeSelector:
Expand Down

0 comments on commit d9ea0bc

Please sign in to comment.