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 83575bd commit 695963c
Show file tree
Hide file tree
Showing 18 changed files with 69 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
Original file line number Diff line number Diff line change
Expand Up @@ -4309,6 +4309,8 @@ data:
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
2 changes: 2 additions & 0 deletions templates/test/ci/cluster-template-prow-ci-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4309,6 +4309,8 @@ data:
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
2 changes: 2 additions & 0 deletions templates/test/ci/cluster-template-prow-custom-vnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3989,6 +3989,8 @@ data:
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
Original file line number Diff line number Diff line change
Expand Up @@ -4303,6 +4303,8 @@ data:
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
2 changes: 2 additions & 0 deletions templates/test/ci/cluster-template-prow-ipv6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4005,6 +4005,8 @@ data:
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
Original file line number Diff line number Diff line change
Expand Up @@ -4257,6 +4257,8 @@ data:
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
2 changes: 2 additions & 0 deletions templates/test/ci/cluster-template-prow-machine-pool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4070,6 +4070,8 @@ data:
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
2 changes: 2 additions & 0 deletions templates/test/ci/cluster-template-prow-nvidia-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7898,6 +7898,8 @@ data:
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
2 changes: 2 additions & 0 deletions templates/test/ci/cluster-template-prow-private.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3998,6 +3998,8 @@ data:
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
2 changes: 2 additions & 0 deletions templates/test/ci/cluster-template-prow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4109,6 +4109,8 @@ data:
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
Original file line number Diff line number Diff line change
Expand Up @@ -4160,6 +4160,8 @@ data:
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
2 changes: 2 additions & 0 deletions templates/test/dev/cluster-template-custom-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4198,6 +4198,8 @@ data:
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

0 comments on commit 695963c

Please sign in to comment.