Skip to content

Commit df87a50

Browse files
committed
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.
1 parent 0faa2bf commit df87a50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/kubeadm/app/cmd/upgrade/node.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ func newNodeData(cmd *cobra.Command, args []string, nodeOptions *nodeOptions, ou
180180
return nil, errors.Wrap(err, "unable to fetch the kubeadm-config ConfigMap")
181181
}
182182

183-
ignorePreflightErrorsSet, err := validation.ValidateIgnorePreflightErrors(nodeOptions.ignorePreflightErrors, initCfg.NodeRegistration.IgnorePreflightErrors)
183+
ignorePreflightErrorsSet, err := validation.ValidateIgnorePreflightErrors(nodeOptions.ignorePreflightErrors, upgradeCfg.Node.IgnorePreflightErrors)
184184
if err != nil {
185185
return nil, err
186186
}
187-
// Also set the union of pre-flight errors to JoinConfiguration, to provide a consistent view of the runtime configuration:
187+
// Also set the union of pre-flight errors to InitConfiguration, to provide a consistent view of the runtime configuration:
188188
initCfg.NodeRegistration.IgnorePreflightErrors = sets.List(ignorePreflightErrorsSet)
189189

190190
var patchesDir string

0 commit comments

Comments
 (0)