k3s/cmd
Rostislav M. Georgiev 037fb6103e kubeadm: config migrate handles more valid configs
kubeadm config migrate uses AnyConfigFileAndDefaultsToInternal, which can
unmarshal config from file only if InitConfiguration or JoinConfiguration are
present. Even with that in mind, it can only return a singlie config object,
with InitConfiguration taking precendence over JoinConfiguration. Thus, the
following cases were not handled properly, while they were perfectly valid for
kubeadm init/join:

- ClusterConfiguration only file caused kubeadm config migrate to exit with
  error.
- Init + Join configurations in the same file caused Init + Cluster
  configuration to be produced (ignoring JoinConfiguration). The same is valid
  when the combo is Init + Cluster + Join configurations.
- Cluster + Join configuration ignores ClusterConfiguration and only
  JoinConfiguration gets migrated.

To fix this, the following is done:
- Introduce MigrateOldConfigFromFile which migrates old config from a file,
  while ensuring that all kubeadm originated input config kinds are taken care
  of. Add comprehensive unit tests for this.
- Replace the use of AnyConfigFileAndDefaultsToInternal in
  kubeadm config migrate with MigrateOldConfigFromFile.
- Remove the no longer used and error prone AnyConfigFileAndDefaultsToInternal.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-21 13:18:39 +02:00
..
clicheck
cloud-controller-manager Report KCM as unhealthy if leader election is wedged. 2018-11-14 16:57:37 -08:00
controller-manager Report KCM as unhealthy if leader election is wedged. 2018-11-14 16:57:37 -08:00
gendocs
genkubedocs GCP: Remove the deprecated google-json-key support 2018-10-02 16:53:28 -07:00
genman
genswaggertypedocs Move from glog to klog 2018-11-10 07:50:31 -05:00
genutils
genyaml
hyperkube Simplify random seed initialization 2018-10-11 21:01:15 +11:00
importverifier
kube-apiserver adds dynamic audit configuration 2018-11-14 17:54:06 -07:00
kube-controller-manager Report KCM as unhealthy if leader election is wedged. 2018-11-14 16:57:37 -08:00
kube-proxy Move from glog to klog 2018-11-10 07:50:31 -05:00
kube-scheduler Add watchdog for leader election logic getting wedged 2018-11-15 11:02:14 -08:00
kubeadm kubeadm: config migrate handles more valid configs 2018-11-21 13:18:39 +02:00
kubectl Simplify random seed initialization 2018-10-11 21:01:15 +11:00
kubelet Revert "Make bootstrap client cert loading part of rotation" 2018-11-17 10:24:39 -05:00
kubemark Move from glog to klog 2018-11-10 07:50:31 -05:00
linkcheck
BUILD
OWNERS