diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 2dafd85ba..d1c24c213 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -220,7 +220,7 @@ func (i *installCmd) run() error { i.namespace = defaultNamespace() } - rawVals, err := vals(i.valueFiles, i.values, i.stringValues) + rawVals, err := vals(i.valueFiles, i.values, i.stringValues, i.certFile, i.keyFile, i.caFile) if err != nil { return err } @@ -335,7 +335,7 @@ func mergeValues(dest map[string]interface{}, src map[string]interface{}) map[st // vals merges values from files specified via -f/--values and // directly via --set or --set-string, marshaling them to YAML -func vals(valueFiles valueFiles, values []string, stringValues []string) ([]byte, error) { +func vals(valueFiles valueFiles, values []string, stringValues []string, CertFile, KeyFile, CAFile string) ([]byte, error) { base := map[string]interface{}{} // User specified a values files via -f/--values @@ -347,7 +347,7 @@ func vals(valueFiles valueFiles, values []string, stringValues []string) ([]byte if strings.TrimSpace(filePath) == "-" { bytes, err = ioutil.ReadAll(os.Stdin) } else { - bytes, err = readFile(filePath) + bytes, err = readFile(filePath, CertFile, KeyFile, CAFile) } if err != nil { @@ -512,7 +512,7 @@ func checkDependencies(ch *chart.Chart, reqs *chartutil.Requirements) error { } //readFile load a file from the local directory or a remote file with a url. -func readFile(filePath string) ([]byte, error) { +func readFile(filePath, CertFile, KeyFile, CAFile string) ([]byte, error) { u, _ := url.Parse(filePath) p := getter.All(settings) @@ -523,7 +523,7 @@ func readFile(filePath string) ([]byte, error) { return ioutil.ReadFile(filePath) } - getter, err := getterConstructor(filePath, "", "", "") + getter, err := getterConstructor(filePath, CertFile, KeyFile, CAFile) if err != nil { return []byte{}, err } diff --git a/cmd/helm/template.go b/cmd/helm/template.go index fc1f44392..458df87b5 100644 --- a/cmd/helm/template.go +++ b/cmd/helm/template.go @@ -130,7 +130,7 @@ func (t *templateCmd) run(cmd *cobra.Command, args []string) error { t.namespace = defaultNamespace() } // get combined values and create config - rawVals, err := vals(t.valueFiles, t.values, t.stringValues) + rawVals, err := vals(t.valueFiles, t.values, t.stringValues, "", "", "") if err != nil { return err } diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 66c4a3657..4dd433a39 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -195,7 +195,7 @@ func (u *upgradeCmd) run() error { } } - rawVals, err := vals(u.valueFiles, u.values, u.stringValues) + rawVals, err := vals(u.valueFiles, u.values, u.stringValues, u.certFile, u.keyFile, u.caFile) if err != nil { return err }