Skip to content

Commit

Permalink
additional fixes based on @thomastaylor312 comment
Browse files Browse the repository at this point in the history
Signed-off-by: raffaelespazzoli <raffaele.spazzoli@gmail.com>
  • Loading branch information
raffaelespazzoli committed Dec 17, 2019
1 parent 0bb4eaa commit a62ba04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions pkg/action/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,9 @@ func (c *Configuration) renderResources(ch *chart.Chart, values chartutil.Values
if c.RESTClientGetter != nil {
rest, err := c.RESTClientGetter.ToRESTConfig()
if err != nil {
files, err2 = engine.Render(ch, values)
} else {
files, err2 = engine.RenderWithClient(ch, values, rest)
return hs, b, "", err
}
files, err2 = engine.RenderWithClient(ch, values, rest)
} else {
files, err2 = engine.Render(ch, values)
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/engine/lookup_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"log"
"strings"

"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/discovery"
Expand Down Expand Up @@ -64,7 +65,7 @@ func getDynamicClientOnKind(apiversion string, kind string, config *rest.Config)
apiRes, err := getAPIReourceForGVK(gvk, config)
if err != nil {
log.Printf("[ERROR] unable to get apiresource from unstructured: %s , error %s", gvk.String(), err)
return nil, false, err
return nil, false, errors.Wrapf(err, "unable to get apiresource from unstructured: %s , error %s", gvk.String())
}
gvr := schema.GroupVersionResource{
Group: apiRes.Group,
Expand Down

0 comments on commit a62ba04

Please sign in to comment.