• Lubomir I. Ivanov's avatar
    kubeadm: fix "upgrade plan" not working without k8s version · 275a7481
    Lubomir I. Ivanov authored
    If the k8s version argument passed to "upgrade plan" is missing
    the logic should perform the following actions:
    - fetch a "stable" version from the internet.
    - if that fails, fallback to the local client version.
    
    Currentely the logic fails because the cfg.KubernetesVersion is
    defaulted to the version of the existing cluster, which
    then causes an early exit without any ugprade suggestions.
    
    See app/cmd/upgrade/common.go::enforceRequirements():
      configutil.FetchInitConfigurationFromCluster(..)
    
    Fix that by passing the explicit user value that can also be "".
    This will then make the "offline getter" treat it as an explicit
    desired upgrade target.
    
    In the future it might be best to invert this logic:
    - if no user k8s version argument is passed - default to the kubeadm
    version.
    - if labels are passed (e.g. "stable"), fetch a version from the
    internet.
    275a7481
Name
Last commit
Last update
.github Loading commit data...
Godeps Loading commit data...
api Loading commit data...
build Loading commit data...
cluster Loading commit data...
cmd Loading commit data...
docs Loading commit data...
hack Loading commit data...
logo Loading commit data...
pkg Loading commit data...
plugin Loading commit data...
staging Loading commit data...
test Loading commit data...
third_party Loading commit data...
translations Loading commit data...
vendor Loading commit data...
.bazelrc Loading commit data...
.generated_files Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.kazelcfg.json Loading commit data...
BUILD.bazel Loading commit data...
CHANGELOG-1.14.md Loading commit data...
CHANGELOG.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
Makefile.generated_files Loading commit data...
OWNERS Loading commit data...
OWNERS_ALIASES Loading commit data...
README.md Loading commit data...
SECURITY_CONTACTS Loading commit data...
SUPPORT.md Loading commit data...
WORKSPACE Loading commit data...
code-of-conduct.md Loading commit data...