|
|
@ -21,7 +21,6 @@ import (
|
|
|
|
"io"
|
|
|
|
"io"
|
|
|
|
"io/ioutil"
|
|
|
|
"io/ioutil"
|
|
|
|
"log"
|
|
|
|
"log"
|
|
|
|
"regexp"
|
|
|
|
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/ghodss/yaml"
|
|
|
|
"github.com/ghodss/yaml"
|
|
|
@ -283,12 +282,9 @@ func coalesceValues(c *chart.Chart, v map[string]interface{}) (map[string]interf
|
|
|
|
// This allows Helm's various sources of values (value files or --set) to
|
|
|
|
// This allows Helm's various sources of values (value files or --set) to
|
|
|
|
// remove incompatible keys from any previous chart, file, or set values.
|
|
|
|
// remove incompatible keys from any previous chart, file, or set values.
|
|
|
|
// ref: http://www.yaml.org/spec/1.2/spec.html#id2803362
|
|
|
|
// ref: http://www.yaml.org/spec/1.2/spec.html#id2803362
|
|
|
|
var nullPattern = regexp.MustCompile("^(?:null|Null|NULL|~)$")
|
|
|
|
if val == nil {
|
|
|
|
if str, ok := val.(string); ok {
|
|
|
|
delete(v, key)
|
|
|
|
if nullPattern.MatchString(str) {
|
|
|
|
continue
|
|
|
|
delete(v, key)
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if _, ok := v[key]; !ok {
|
|
|
|
if _, ok := v[key]; !ok {
|
|
|
|