Skip to content

Commit

Permalink
Add control-plane NoSchedule tolerations on calico deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecile Robert-Michon committed Feb 16, 2022
1 parent f5a5c73 commit f95a16e
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 1 deletion.
2 changes: 2 additions & 0 deletions templates/addons/calico-ipv6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3702,6 +3702,8 @@ spec:
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/master
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
---
apiVersion: apps/v1
kind: Deployment
Expand Down
5 changes: 5 additions & 0 deletions templates/addons/calico-ipv6/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ patches:
name: calico-node
namespace: kube-system
path: patches/calico-node.yaml
- path: patches/control-plane-tolerations.yaml
target:
kind: Deployment
name: calico-kube-controllers
namespace: kube-system
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: calico-kube-controllers
namespace: kube-system
spec:
template:
spec:
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/master
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
2 changes: 2 additions & 0 deletions templates/addons/calico.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3716,6 +3716,8 @@ spec:
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/master
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
Expand Down
7 changes: 6 additions & 1 deletion templates/addons/calico/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@ patches:
kind: DaemonSet
name: calico-node
namespace: kube-system
path: patches/remove-aws-reference.yaml
path: patches/remove-aws-reference.yaml
- path: patches/control-plane-tolerations.yaml
target:
kind: Deployment
name: calico-kube-controllers
namespace: kube-system
15 changes: 15 additions & 0 deletions templates/addons/calico/patches/control-plane-tolerations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: calico-kube-controllers
namespace: kube-system
spec:
template:
spec:
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/master
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane

0 comments on commit f95a16e

Please sign in to comment.