mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Merge pull request #113355 from chendave/preflightErrors
kubeadm: Don't reuse the `ignorePreflightErrors` from initCfg for `reset`
This commit is contained in:
commit
f3e6e05979
@ -109,7 +109,8 @@ func newResetData(cmd *cobra.Command, options *resetOptions, in io.Reader, out i
|
||||
klog.V(1).Infof("[reset] Could not obtain a client set from the kubeconfig file: %s", options.kubeconfigPath)
|
||||
}
|
||||
|
||||
ignorePreflightErrorsSet, err := validation.ValidateIgnorePreflightErrors(options.ignorePreflightErrors, ignorePreflightErrors(cfg))
|
||||
ignorePreflightErrorsFromCfg := []string{}
|
||||
ignorePreflightErrorsSet, err := validation.ValidateIgnorePreflightErrors(options.ignorePreflightErrors, ignorePreflightErrorsFromCfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -144,13 +145,6 @@ func newResetData(cmd *cobra.Command, options *resetOptions, in io.Reader, out i
|
||||
}, nil
|
||||
}
|
||||
|
||||
func ignorePreflightErrors(cfg *kubeadmapi.InitConfiguration) []string {
|
||||
if cfg == nil {
|
||||
return []string{}
|
||||
}
|
||||
return cfg.NodeRegistration.IgnorePreflightErrors
|
||||
}
|
||||
|
||||
// AddResetFlags adds reset flags
|
||||
func AddResetFlags(flagSet *flag.FlagSet, resetOptions *resetOptions) {
|
||||
flagSet.StringVar(
|
||||
|
Loading…
Reference in New Issue
Block a user