Commit dacc4013 authored by Trevor Hartman's avatar Trevor Hartman

Include values from both --set and --values when specified on install

parent 120256ec
......@@ -147,13 +147,28 @@ func (i *installCmd) run() error {
}
func (i *installCmd) vals() ([]byte, error) {
if len(i.values.pairs) > 0 {
return i.values.yaml()
var buffer bytes.Buffer
// User specified a values file via -f/--values
if i.valuesFile != "" {
bytes, err := ioutil.ReadFile(i.valuesFile)
if err != nil {
return []byte{}, err
}
buffer.Write(bytes)
}
if i.valuesFile == "" {
return []byte{}, nil
// User specified value pairs via --set
// These override any values in the specified file
if len(i.values.pairs) > 0 {
bytes, err := i.values.yaml()
if err != nil {
return []byte{}, err
}
buffer.Write(bytes)
}
return ioutil.ReadFile(i.valuesFile)
return buffer.Bytes(), nil
}
func (i *installCmd) printRelease(rel *release.Release) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment