mirror of https://github.com/k3s-io/k3s
kubeadm: allow usage --config with --print-join-command
kubeadm token create --print-join-command --config <path> fails with Error: can not mix '--config' with arguments [print-join-command] As print-joint command can't be put into the configuration file it should be possible to use those 2 options at the same time. Added print-join-command options to the list of exceptions in ValidateMixedArguments check to allow its usage with --config option. Fixes: kubernetes/kubeadm#1166pull/58/head
parent
85d52d8a2b
commit
eacff9436e
|
@ -380,7 +380,7 @@ func ValidateMixedArguments(flag *pflag.FlagSet) error {
|
|||
|
||||
mixedInvalidFlags := []string{}
|
||||
flag.Visit(func(f *pflag.Flag) {
|
||||
if f.Name == "config" || f.Name == "ignore-preflight-errors" || strings.HasPrefix(f.Name, "skip-") || f.Name == "dry-run" || f.Name == "kubeconfig" || f.Name == "v" || f.Name == "rootfs" {
|
||||
if f.Name == "config" || f.Name == "ignore-preflight-errors" || strings.HasPrefix(f.Name, "skip-") || f.Name == "dry-run" || f.Name == "kubeconfig" || f.Name == "v" || f.Name == "rootfs" || f.Name == "print-join-command" {
|
||||
// "--skip-*" flags or other whitelisted flags can be set with --config
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue