Add a setting for chart repository CA certificates [#74]

This commit is contained in:
Erin Call
2020-01-20 09:15:35 -08:00
parent 8a9cf23ab9
commit 1f7b6bb389
6 changed files with 28 additions and 4 deletions

View File

@@ -7,8 +7,9 @@ import (
// AddRepo is an execution step that calls `helm repo add` when executed.
type AddRepo struct {
Repo string
cmd cmd
Repo string
CAFile string
cmd cmd
}
// Execute executes the `helm repo add` command.
@@ -38,7 +39,11 @@ func (a *AddRepo) Prepare(cfg Config) error {
args = append(args, "--debug")
}
args = append(args, "repo", "add", name, url)
args = append(args, "repo", "add")
if a.CAFile != "" {
args = append(args, "--ca-file", a.CAFile)
}
args = append(args, name, url)
a.cmd = command(helmBin, args...)
a.cmd.Stdout(cfg.Stdout)