mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
Include values from both --set and --values when specified on install
This commit is contained in:
parent
120256ecb3
commit
dacc4013c1
1 changed files with 20 additions and 5 deletions
|
|
@ -147,13 +147,28 @@ func (i *installCmd) run() error {
|
|||
}
|
||||
|
||||
func (i *installCmd) vals() ([]byte, error) {
|
||||
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)
|
||||
}
|
||||
|
||||
// User specified value pairs via --set
|
||||
// These override any values in the specified file
|
||||
if len(i.values.pairs) > 0 {
|
||||
return i.values.yaml()
|
||||
bytes, err := i.values.yaml()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
buffer.Write(bytes)
|
||||
}
|
||||
if i.valuesFile == "" {
|
||||
return []byte{}, nil
|
||||
}
|
||||
return ioutil.ReadFile(i.valuesFile)
|
||||
|
||||
return buffer.Bytes(), nil
|
||||
}
|
||||
|
||||
func (i *installCmd) printRelease(rel *release.Release) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue