Signed-off-by: zwwhdls <zwwhdls@hotmail.com>
pull/7234/head
zwwhdls 6 years ago
parent 22e00bebdf
commit 94621a09f2

@ -23,6 +23,7 @@ import (
"os" "os"
"path" "path"
"path/filepath" "path/filepath"
"reflect"
"strings" "strings"
"text/template" "text/template"
"time" "time"
@ -218,6 +219,11 @@ func (i *Install) Run(chrt *chart.Chart, vals map[string]interface{}) (*release.
} }
// Check error from render // Check error from render
if err != nil { if err != nil {
if chrt.Values == nil && reflect.DeepEqual(vals, map[string]interface{}{}) {
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.New("failed to render resource: lack of values.yaml")
}
rel.SetStatus(release.StatusFailed, fmt.Sprintf("failed to render resource: %s", err.Error())) rel.SetStatus(release.StatusFailed, fmt.Sprintf("failed to render resource: %s", err.Error()))
// Return a release with partial data so that the client can show debugging information. // Return a release with partial data so that the client can show debugging information.
return rel, err return rel, err

Loading…
Cancel
Save