mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
fix kubeadm-731
This commit is contained in:
parent
d4ded15f8a
commit
22409e8fa9
@ -70,16 +70,19 @@ func enforceRequirements(flags *cmdUpgradeFlags, dryRun bool, newK8sVersion stri
|
|||||||
cfg.KubernetesVersion = newK8sVersion
|
cfg.KubernetesVersion = newK8sVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If features gates are passed to the command line, use it (otherwise use featureGates from configuration)
|
||||||
|
if flags.featureGatesString != "" {
|
||||||
|
cfg.FeatureGates, err = features.NewFeatureGate(&features.InitFeatureGates, flags.featureGatesString)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("[upgrade/config] FATAL: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If the user told us to print this information out; do it!
|
// If the user told us to print this information out; do it!
|
||||||
if flags.printConfig {
|
if flags.printConfig {
|
||||||
printConfiguration(cfg, os.Stdout)
|
printConfiguration(cfg, os.Stdout)
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg.FeatureGates, err = features.NewFeatureGate(&features.InitFeatureGates, flags.featureGatesString)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("[upgrade/config] FATAL: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return &upgradeVariables{
|
return &upgradeVariables{
|
||||||
client: client,
|
client: client,
|
||||||
cfg: cfg,
|
cfg: cfg,
|
||||||
|
Loading…
Reference in New Issue
Block a user