Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WRKLDS-1015: tolerate node-role.kubernetes.io/control-plane:NoExecute #340

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ spec:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoExecute"
- key: "node.kubernetes.io/unreachable"
operator: "Exists"
effect: "NoExecute"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ spec:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoExecute
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
Expand Down
3 changes: 3 additions & 0 deletions pkg/cloud/aws/assets/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ spec:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoExecute
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ spec:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoExecute
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
Expand Down
3 changes: 3 additions & 0 deletions pkg/cloud/azure/assets/cloud-node-manager-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ spec:
tolerations:
- effect: NoSchedule
operator: Exists
- effect: NoExecute
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ spec:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoExecute
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
Expand Down
3 changes: 3 additions & 0 deletions pkg/cloud/azurestack/assets/cloud-node-manager-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ spec:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoExecute
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
Expand Down
7 changes: 6 additions & 1 deletion pkg/cloud/cloud_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,10 @@ func checkResourceTolerations(t *testing.T, podSpec corev1.PodSpec) {
Operator: corev1.TolerationOpExists,
Effect: corev1.TaintEffectNoSchedule,
}
noExecuteTaint := corev1.Toleration{
Operator: corev1.TolerationOpExists,
Effect: corev1.TaintEffectNoExecute,
}

tolerations := podSpec.Tolerations

Expand All @@ -422,7 +426,8 @@ func checkResourceTolerations(t *testing.T, podSpec corev1.PodSpec) {
ContainElement(notReadyTaint),
),
ContainElement(noScheduleTaint),
), "PodSpec must either contain the uninitialized and not-ready tolerations, or tolerate any NoSchedule taint")
ContainElement(noExecuteTaint),
), "PodSpec must either contain the uninitialized and not-ready tolerations, or tolerate any NoSchedule/NoExecute taints")
}

func checkHostNetwork(t *testing.T, podSpec corev1.PodSpec) {
Expand Down
3 changes: 3 additions & 0 deletions pkg/cloud/gcp/assets/cloud-controller-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ spec:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoExecute
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
Expand Down
3 changes: 3 additions & 0 deletions pkg/cloud/ibm/assets/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ spec:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoExecute
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ spec:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoExecute
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
Expand Down
3 changes: 3 additions & 0 deletions pkg/cloud/openstack/assets/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ spec:
- key: node-role.kubernetes.io/master
operator: Exists
effect: "NoSchedule"
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: "NoExecute"
- key: node.cloudprovider.kubernetes.io/uninitialized
operator: Exists
effect: NoSchedule
Expand Down
3 changes: 3 additions & 0 deletions pkg/cloud/powervs/assets/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ spec:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoExecute
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ spec:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoExecute
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
Expand Down