Skip to content

Commit

Permalink
use node-label flag instead
Browse files Browse the repository at this point in the history
Signed-off-by: Dentrax <[email protected]>
  • Loading branch information
Dentrax committed May 2, 2021
1 parent 40dcfa9 commit e9435c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/node/nodeCreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func NewCmdNodeCreate() *cobra.Command {
cmd.Flags().BoolVar(&createNodeOpts.Wait, "wait", false, "Wait for the node(s) to be ready before returning.")
cmd.Flags().DurationVar(&createNodeOpts.Timeout, "timeout", 0*time.Second, "Maximum waiting time for '--wait' before canceling/returning.")

cmd.Flags().StringSliceP("labels", "l", []string{}, "Specify node labels in format \"foo=bar\"")
cmd.Flags().StringSliceP("node-label", "l", []string{}, "Specify node labels in format \"foo=bar\"")

// done
return cmd
Expand Down Expand Up @@ -127,9 +127,9 @@ func parseCreateNodeCmd(cmd *cobra.Command, args []string) ([]*k3d.Node, *k3d.Cl
log.Errorf("Provided memory limit value is invalid")
}

labels, err := cmd.Flags().GetStringSlice("labels")
labels, err := cmd.Flags().GetStringSlice("node-label")
if err != nil {
log.Errorln("No labels specified")
log.Errorln("No node-label specified")
log.Fatalln(err)
}

Expand Down

0 comments on commit e9435c8

Please sign in to comment.