From c6d3f628bb2d9ba94fef87491474e2854d898ccc Mon Sep 17 00:00:00 2001 From: zwwhdls Date: Mon, 16 Dec 2019 08:18:57 +0800 Subject: [PATCH] don't use reflect Signed-off-by: zwwhdls --- pkg/action/install.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/action/install.go b/pkg/action/install.go index 546c91434..f15b10dbe 100644 --- a/pkg/action/install.go +++ b/pkg/action/install.go @@ -23,7 +23,6 @@ import ( "os" "path" "path/filepath" - "reflect" "strings" "text/template" "time" @@ -219,7 +218,7 @@ func (i *Install) Run(chrt *chart.Chart, vals map[string]interface{}) (*release. } // Check error from render if err != nil { - if chrt.Values == nil && reflect.DeepEqual(vals, map[string]interface{}{}) { + if chrt.Values == nil && len(vals) == 0 { rel.SetStatus(release.StatusFailed, fmt.Sprint("failed to render resource: lack of values.yaml")) // Return a release with partial data so that the client can show debugging information. return rel, errors.Wrap(err, "failed to render resource: lack of values.yaml")