From 02ce01b2415fe270a760c984f2e0158b18476573 Mon Sep 17 00:00:00 2001 From: raffaelespazzoli Date: Wed, 23 Oct 2019 07:51:53 -0400 Subject: [PATCH] fixed circle ci issues Signed-off-by: raffaelespazzoli --- pkg/engine/funcs.go | 2 +- pkg/engine/lookup_func.go | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/engine/funcs.go b/pkg/engine/funcs.go index eb4a398f4..6ff10ea72 100644 --- a/pkg/engine/funcs.go +++ b/pkg/engine/funcs.go @@ -53,7 +53,7 @@ func funcMap() template.FuncMap { "fromYaml": fromYAML, "toJson": toJSON, "fromJson": fromJSON, - "lookup" : lookup, + "lookup": lookup, // This is a placeholder for the "include" function, which is // late-bound to a template. By declaring it here, we preserve the diff --git a/pkg/engine/lookup_func.go b/pkg/engine/lookup_func.go index fd3768292..75b822f86 100644 --- a/pkg/engine/lookup_func.go +++ b/pkg/engine/lookup_func.go @@ -16,7 +16,6 @@ import ( ) var config *rest.Config -var addLookupFunction = false func init() { // try the out-cluster config, this will default to the in-cluster config is not successful @@ -31,10 +30,8 @@ func init() { // use the current context in kubeconfig config1, err := clientcmd.BuildConfigFromFlags("", *kubeconfig) if err == nil { - addLookupFunction = true config = config1 } - return } func homeDir() string { @@ -103,7 +100,7 @@ func getAPIReourceForGVK(gvk schema.GroupVersionKind) (metav1.APIResource, error } resList, err := discoveryClient.ServerResourcesForGroupVersion(gvk.GroupVersion().String()) if err != nil { - log.Printf("[ERROR] unable to retrieve resouce list for: %s , error: %s", gvk.GroupVersion().String(), err) + log.Printf("[ERROR] unable to retrieve resource list for: %s , error: %s", gvk.GroupVersion().String(), err) return res, err } for _, resource := range resList.APIResources {