MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / UncordonAll

Function UncordonAll

tests/utils/nodes/nodes.go:87–103  ·  view source on GitHub ↗

UncordonAll executes the 'kubectl uncordon' command on each node of the list

(
	ctx context.Context,
	crudClient client.Client,
)

Source from the content-addressed store, hash-verified

85
86// UncordonAll executes the 'kubectl uncordon' command on each node of the list
87func 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
106func List(

Callers 1

drain_node_test.goFile · 0.92

Calls 2

RunFunction · 0.92
ListFunction · 0.70

Tested by

no test coverage detected