Uncordon will remove the NoSchedule on the node
(nodeName string)
| 195 | |
| 196 | // Uncordon will remove the NoSchedule on the node |
| 197 | func (n Node) Uncordon(nodeName string) error { |
| 198 | if n.nthConfig.DryRun { |
| 199 | log.Info().Str("node_name", nodeName).Msg("Node would have been uncordoned, but dry-run flag was set") |
| 200 | return nil |
| 201 | } |
| 202 | node, err := n.fetchKubernetesNode(nodeName) |
| 203 | if err != nil { |
| 204 | return fmt.Errorf("there was an error fetching the node in preparation for uncordoning: %w", err) |
| 205 | } |
| 206 | err = drain.RunCordonOrUncordon(n.drainHelper, node, false) |
| 207 | if err != nil { |
| 208 | return err |
| 209 | } |
| 210 | return nil |
| 211 | } |
| 212 | |
| 213 | // IsUnschedulable checks if the node is marked as unschedulable |
| 214 | func (n Node) IsUnschedulable(nodeName string) (bool, error) { |