k3s/cmd
Rostislav M. Georgiev e10dcf07d7 kubeadm: Introduce ValidateSupportedVersion in place of DetectUnsupportedVersion
DetectUnsupportedVersion is somewhat uncomfortable, complex and inefficient
function to use. It takes an entire YAML document as bytes, splits it up to
byte slices of the different YAML sub-documents and group-version-kinds and
searches through those to detect an unsupported kubeadm config. If such config
is detected, the function returns an error, if it is not (i.e. the normal
function operation) everything done so far is discarded.

This could have been acceptable, if not the fact, that in all cases that this
function is called, the YAML document bytes are split up and an iteration on
GVK map is performed yet again. Hence, we don't need DetectUnsupportedVersion
in its current form as it's inefficient, complex and takes only YAML document
bytes.

This change replaces DetectUnsupportedVersion with ValidateSupportedVersion,
which takes a GroupVersion argument and checks if it is on the list of
unsupported config versions. In that case an error is returned.
ValidateSupportedVersion relies on the caller to read and split the YAML
document and then iterate on its GVK map checking if the particular
GroupVersion is supported or not.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-01 19:35:39 +02:00
..
clicheck
cloud-controller-manager remove unnecessary nil check for cloud 2019-01-25 23:26:40 +08:00
controller-manager auto-generated file 2019-01-16 16:07:21 +08:00
gendocs
genkubedocs GCP: Remove the deprecated google-json-key support 2018-10-02 16:53:28 -07:00
genman Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
genswaggertypedocs Move from glog to klog 2018-11-10 07:50:31 -05:00
genutils
genyaml
hyperkube Remove explicit nil initialization and correct error string. 2019-01-18 09:29:25 +05:30
importverifier fix message output for import verifier 2018-05-10 12:50:28 -04:00
kube-apiserver Remove alpha InitializerConfiguration types, Initializers admission plugin 2019-01-23 11:37:39 -05:00
kube-controller-manager Merge pull request #72818 from humblec/md-2 2019-01-28 21:52:03 -08:00
kube-proxy autogen files 2019-01-17 09:16:36 -05:00
kube-scheduler Merge pull request #73109 from palash25/verlog 2019-01-25 15:28:08 -08:00
kubeadm kubeadm: Introduce ValidateSupportedVersion in place of DetectUnsupportedVersion 2019-02-01 19:35:39 +02:00
kubectl Simplify random seed initialization 2018-10-11 21:01:15 +11:00
kubelet replace pkg/util/nsenter with k8s.io/utils/nsenter 2019-01-24 13:49:04 -05:00
kubemark autogen files 2019-01-17 09:16:36 -05:00
linkcheck
BUILD
OWNERS