Commit 04a0659b authored by Matt Butcher's avatar Matt Butcher Committed by GitHub

Merge pull request #2809 from rocky-nupt/feature-read-from-STDIN

feat(helm):Support reading the values file from STDIN
parents 5bc7c619 084dff47
......@@ -310,7 +310,14 @@ func vals(valueFiles valueFiles, values []string) ([]byte, error) {
// User specified a values files via -f/--values
for _, filePath := range valueFiles {
currentMap := map[string]interface{}{}
bytes, err := ioutil.ReadFile(filePath)
var bytes []byte
var err error
if strings.TrimSpace(filePath) == "-" {
bytes, err = ioutil.ReadAll(os.Stdin)
} else {
bytes, err = ioutil.ReadFile(filePath)
}
if err != nil {
return []byte{}, err
}
......
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