UncordonAll executes the 'kubectl uncordon' command on each node of the list
( ctx context.Context, crudClient client.Client, )
| 85 | |
| 86 | // UncordonAll executes the 'kubectl uncordon' command on each node of the list |
| 87 | func UncordonAll( |
| 88 | ctx context.Context, |
| 89 | crudClient client.Client, |
| 90 | ) error { |
| 91 | nodeList, err := List(ctx, crudClient) |
| 92 | if err != nil { |
| 93 | return err |
| 94 | } |
| 95 | for _, node := range nodeList.Items { |
| 96 | command := fmt.Sprintf("kubectl uncordon %v", node.Name) |
| 97 | _, _, err = run.Run(command) |
| 98 | if err != nil { |
| 99 | return err |
| 100 | } |
| 101 | } |
| 102 | return nil |
| 103 | } |
| 104 | |
| 105 | // List gathers the current list of Nodes |
| 106 | func List( |
no test coverage detected