Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/cmd/kind/create/cluster/createcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command {
&flags.Name,
"name",
"n",
"",
"cluster name, overrides KIND_CLUSTER_NAME, config (default kind)",
cluster.DefaultName,
cli.NameFlagHelp,
)
cmd.Flags().StringVar(
&flags.Config,
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/kind/delete/cluster/deletecluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Errors will only occur if the cluster resources exist and are not able to be del
"name",
"n",
cluster.DefaultName,
"the cluster name",
cli.NameFlagHelp,
)
cmd.Flags().StringVar(
&flags.Kubeconfig,
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/kind/export/kubeconfig/kubeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command {
"name",
"n",
cluster.DefaultName,
"the cluster context name",
cli.NameFlagHelp,
)
cmd.Flags().StringVar(
&flags.Kubeconfig,
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/kind/export/logs/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command {
"name",
"n",
cluster.DefaultName,
"the cluster context name",
cli.NameFlagHelp,
)
return cmd
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/kind/get/kubeconfig/kubeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command {
"name",
"n",
cluster.DefaultName,
"the cluster context name",
cli.NameFlagHelp,
)
cmd.Flags().BoolVar(
&flags.Internal,
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/kind/get/nodes/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command {
"name",
"n",
cluster.DefaultName,
"the cluster context name",
cli.NameFlagHelp,
)
cmd.Flags().BoolVarP(
&flags.AllClusters,
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/kind/load/docker-image/docker-image.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command {
"name",
"n",
cluster.DefaultName,
"the cluster context name",
cli.NameFlagHelp,
)
cmd.Flags().StringSliceVar(
&flags.Nodes,
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/kind/load/image-archive/image-archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command {
"name",
"n",
cluster.DefaultName,
"the cluster context name",
cli.NameFlagHelp,
)
cmd.Flags().StringSliceVar(
&flags.Nodes,
Expand Down
3 changes: 3 additions & 0 deletions pkg/internal/cli/override.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import (
"github.com/spf13/pflag"
)

// NameFlagHelp is the shared help text for the --name flag.
const NameFlagHelp = "cluster name (or via KIND_CLUSTER_NAME)"

// OverrideDefaultName conditionally allows overriding the default cluster name
// by setting the KIND_CLUSTER_NAME environment variable
// only if --name wasn't set explicitly
Expand Down