k3s/cmd
Lubomir I. Ivanov 275a748133 kubeadm: fix "upgrade plan" not working without k8s version
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.
2019-03-29 21:54:25 +02:00
..
clicheck Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
cloud-controller-manager delete the persistentvolume labeler controller 2019-02-26 14:23:20 -05:00
controller-manager enforce that cloud providers are only linked in main or app packages 2019-02-22 11:56:39 -08:00
gendocs Create work-around wrappers for pure attribute on go_binary and go_test 2019-02-22 18:08:34 -08:00
genkubedocs Create work-around wrappers for pure attribute on go_binary and go_test 2019-02-22 18:08:34 -08:00
genman Create work-around wrappers for pure attribute on go_binary and go_test 2019-02-22 18:08:34 -08:00
genswaggertypedocs Create work-around wrappers for pure attribute on go_binary and go_test 2019-02-22 18:08:34 -08:00
genutils Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
genyaml Create work-around wrappers for pure attribute on go_binary and go_test 2019-02-22 18:08:34 -08:00
hyperkube Deprecate make-symlink parameter in hyperkube 2019-03-05 13:00:38 -05:00
importverifier delete all duplicate empty blanks 2019-02-23 10:28:04 +08:00
kube-apiserver generated BUILD 2019-03-11 10:26:56 -07:00
kube-controller-manager CSI Inline Volume - API changes 2019-03-08 12:35:07 -05:00
kube-proxy Merge pull request #70896 from ksubrmnn/overlay_dsr 2019-02-20 12:53:13 -08:00
kube-scheduler delete all duplicate empty blanks 2019-02-23 10:28:04 +08:00
kubeadm kubeadm: fix "upgrade plan" not working without k8s version 2019-03-29 21:54:25 +02:00
kubectl autogen files to support new project structure. 2019-02-15 10:29:31 -05:00
kubelet Migrate to internal node.k8s.io client 2019-03-07 11:57:12 -08:00
kubemark Create work-around wrappers for pure attribute on go_binary and go_test 2019-02-22 18:08:34 -08:00
linkcheck Create work-around wrappers for pure attribute on go_binary and go_test 2019-02-22 18:08:34 -08:00
BUILD gke-certificates-controller: rm -rf 2018-02-15 12:01:00 -08:00
OWNERS Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00