diff --git a/cmd/kubeadm/app/cmd/upgrade/node.go b/cmd/kubeadm/app/cmd/upgrade/node.go index 4a7280d96b6..eaafd186be1 100644 --- a/cmd/kubeadm/app/cmd/upgrade/node.go +++ b/cmd/kubeadm/app/cmd/upgrade/node.go @@ -180,11 +180,11 @@ func newNodeData(cmd *cobra.Command, args []string, nodeOptions *nodeOptions, ou return nil, errors.Wrap(err, "unable to fetch the kubeadm-config ConfigMap") } - ignorePreflightErrorsSet, err := validation.ValidateIgnorePreflightErrors(nodeOptions.ignorePreflightErrors, initCfg.NodeRegistration.IgnorePreflightErrors) + ignorePreflightErrorsSet, err := validation.ValidateIgnorePreflightErrors(nodeOptions.ignorePreflightErrors, upgradeCfg.Node.IgnorePreflightErrors) if err != nil { return nil, err } - // Also set the union of pre-flight errors to JoinConfiguration, to provide a consistent view of the runtime configuration: + // Also set the union of pre-flight errors to InitConfiguration, to provide a consistent view of the runtime configuration: initCfg.NodeRegistration.IgnorePreflightErrors = sets.List(ignorePreflightErrorsSet) var patchesDir string