From 1c9c7a82385a76d7a8c23606f2711368656ced33 Mon Sep 17 00:00:00 2001 From: Mathieu Ouellet Date: Thu, 7 Jul 2022 08:04:56 -0400 Subject: [PATCH] Add taint flag to cluster add-node command --- cmd/cluster.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/cluster.go b/cmd/cluster.go index 4bd8419f..2c67c0f1 100644 --- a/cmd/cluster.go +++ b/cmd/cluster.go @@ -130,6 +130,10 @@ func ClusterCommand() cli.Command { Name: "worker", Usage: "Use node as a worker", }, + cli.StringSliceFlag{ + Name: "taint", + Usage: "Taint to apply to a node in the format [name]=[value:effect]", + }, quietFlag, }, }, @@ -389,6 +393,12 @@ func clusterAddNode(ctx *cli.Context) error { } } + if taints := ctx.StringSlice("taint"); taints != nil { + for _, taint := range taints { + command = command + fmt.Sprintf(" --taint %v", taint) + } + } + if ctx.Bool("quiet") { fmt.Println(command) return nil