mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
kubeadm: use UpgradeNodeConfiguration.IgnorePreflightErrors
When using UpgradeNodeConfiguration.IgnorePreflightErrors the field is currently ignored in favor of the "defualted" field created by configutil.FetchInitConfigurationFromCluster. Fix this bug.
This commit is contained in:
parent
0faa2bfbc1
commit
df87a503c2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user