Commit 2ca8d955 authored by Karan Goel's avatar Karan Goel

Remove clusterName flag, just use config file

parent 73bb511a
...@@ -55,7 +55,7 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} { ...@@ -55,7 +55,7 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} {
obj.CIImageRepository = "" obj.CIImageRepository = ""
obj.UnifiedControlPlaneImage = "foo" obj.UnifiedControlPlaneImage = "foo"
obj.FeatureGates = map[string]bool{"foo": true} obj.FeatureGates = map[string]bool{"foo": true}
obj.ClusterName = "kubernetes" obj.ClusterName = "foo"
obj.APIServerExtraArgs = map[string]string{"foo": "foo"} obj.APIServerExtraArgs = map[string]string{"foo": "foo"}
obj.APIServerExtraVolumes = []kubeadm.HostPathMount{{ obj.APIServerExtraVolumes = []kubeadm.HostPathMount{{
Name: "foo", Name: "foo",
...@@ -133,7 +133,7 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} { ...@@ -133,7 +133,7 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} {
obj.TLSBootstrapToken = "foo" obj.TLSBootstrapToken = "foo"
obj.Token = "foo" obj.Token = "foo"
obj.CRISocket = "foo" obj.CRISocket = "foo"
obj.ClusterName = "kubernetes" obj.ClusterName = "foo"
}, },
} }
} }
...@@ -186,10 +186,6 @@ func AddInitConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiext.MasterConfigur ...@@ -186,10 +186,6 @@ func AddInitConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiext.MasterConfigur
`Specify the node name.`, `Specify the node name.`,
) )
flagSet.StringVar( flagSet.StringVar(
&cfg.ClusterName, "cluster-name", cfg.ClusterName,
`Specify the cluster name`,
)
flagSet.StringVar(
&cfg.Token, "token", cfg.Token, &cfg.Token, "token", cfg.Token,
"The token to use for establishing bidirectional trust between nodes and masters.", "The token to use for establishing bidirectional trust between nodes and masters.",
) )
......
...@@ -154,9 +154,6 @@ func AddJoinConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiext.NodeConfigurat ...@@ -154,9 +154,6 @@ func AddJoinConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiext.NodeConfigurat
&cfg.NodeName, "node-name", "", &cfg.NodeName, "node-name", "",
"Specify the node name.") "Specify the node name.")
flagSet.StringVar( flagSet.StringVar(
&cfg.ClusterName, "cluster-name", cfg.ClusterName,
"Specify the cluster name.")
flagSet.StringVar(
&cfg.TLSBootstrapToken, "tls-bootstrap-token", "", &cfg.TLSBootstrapToken, "tls-bootstrap-token", "",
"A token used for TLS bootstrapping.") "A token used for TLS bootstrapping.")
flagSet.StringSliceVar( flagSet.StringSliceVar(
......
...@@ -189,7 +189,6 @@ func getKubeConfigSubCommands(out io.Writer, outDir, defaultKubernetesVersion st ...@@ -189,7 +189,6 @@ func getKubeConfigSubCommands(out io.Writer, outDir, defaultKubernetesVersion st
cmd.Flags().StringVar(&token, "token", token, "The token that should be used as the authentication mechanism for this kubeconfig (instead of client certificates)") cmd.Flags().StringVar(&token, "token", token, "The token that should be used as the authentication mechanism for this kubeconfig (instead of client certificates)")
cmd.Flags().StringVar(&clientName, "client-name", clientName, "The name of user. It will be used as the CN if client certificates are created") cmd.Flags().StringVar(&clientName, "client-name", clientName, "The name of user. It will be used as the CN if client certificates are created")
} }
cmd.Flags().StringVar(&cfg.ClusterName, "cluster-name", cfg.ClusterName, "Specify the cluster name.")
subCmds = append(subCmds, cmd) subCmds = append(subCmds, cmd)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment