fix kubeadm-731

pull/8/head
fabriziopandini 2018-04-12 11:21:23 +02:00
parent d4ded15f8a
commit 22409e8fa9
1 changed files with 8 additions and 5 deletions

View File

@ -70,16 +70,19 @@ func enforceRequirements(flags *cmdUpgradeFlags, dryRun bool, newK8sVersion stri
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 flags.printConfig {
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{
client: client,
cfg: cfg,