From bd27481c88cbee0b14b438d9ee2eba5ce998b34f Mon Sep 17 00:00:00 2001 From: vrovachev Date: Wed, 13 Dec 2017 21:06:37 +0400 Subject: [PATCH] Fixed typos in storer_k8s file. * Fixed variable from createTPR to createCRD. * Fixed check for general clientset. Change-Id: I09cae96ec5c2db27c6395e6690ca8fb10b29c6ed --- pkg/utils/storer_k8s.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/utils/storer_k8s.go b/pkg/utils/storer_k8s.go index d093ac9..6e30360 100644 --- a/pkg/utils/storer_k8s.go +++ b/pkg/utils/storer_k8s.go @@ -36,7 +36,7 @@ type k8sAgentStorage struct { ExtensionsClientset ext_client.Clientset } -func connect2k8s(createTPR bool) (Proxy, ext_client.Clientset, error) { +func connect2k8s(createCRD bool) (Proxy, ext_client.Clientset, error) { var err error var clientset *kubernetes.Clientset @@ -49,13 +49,17 @@ func connect2k8s(createTPR bool) (Proxy, ext_client.Clientset, error) { } clientset, err = proxy.SetupClientSet(config) + if err != nil { + glog.Error(err) + return nil, nil, err + } apiextensionsclientset, err := apiextensionsclient.NewForConfig(config) if err != nil { glog.Error(err) return nil, nil, err } - if !createTPR { + if !createCRD { return proxy, nil, err }