Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #287 from weaveworks/remove-bogus-taint-check
Browse files Browse the repository at this point in the history
Remove bogus taint check in controller
  • Loading branch information
bboreham committed Aug 10, 2020
2 parents 13f4a7c + acab5e5 commit 38998f6
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions pkg/apis/wksprovider/controller/wksctl/machine_controller.go
Expand Up @@ -855,7 +855,7 @@ func (a *MachineController) checkMasterHAConstraint(ctx context.Context, nodeBei
if sameNode(nodeBeingUpdated, node) {
continue
}
if hasConditionTrue(node, corev1.NodeReady) && !hasTaint(node, "NoSchedule") {
if hasConditionTrue(node, corev1.NodeReady) {
avail++
if avail >= quorum {
return nil
Expand All @@ -880,15 +880,6 @@ func hasConditionTrue(node *corev1.Node, typ corev1.NodeConditionType) bool {
return false
}

func hasTaint(node *corev1.Node, value string) bool {
for _, taint := range node.Spec.Taints {
if taint.Value == value {
return true
}
}
return false
}

func (a *MachineController) findNodeByID(ctx context.Context, machineID, systemUUID string) (*corev1.Node, error) {
nodes, err := a.clientSet.CoreV1().Nodes().List(ctx, metav1.ListOptions{})
if err != nil {
Expand Down

0 comments on commit 38998f6

Please sign in to comment.