feat: helm repo add --ca-file via repositories definition (#856)

Resolves #855
This commit is contained in:
Theo Meneau
2019-09-14 06:23:54 +02:00
committed by KUOKA Yusuke
parent ef63a05513
commit 216c228c0b
7 changed files with 47 additions and 14 deletions
+4 -1
View File
@@ -68,12 +68,15 @@ func (helm *execer) SetHelmBinary(bin string) {
helm.helmBinary = bin
}
func (helm *execer) AddRepo(name, repository, certfile, keyfile, username, password string) error {
func (helm *execer) AddRepo(name, repository, cafile, certfile, keyfile, username, password string) error {
var args []string
args = append(args, "repo", "add", name, repository)
if certfile != "" && keyfile != "" {
args = append(args, "--cert-file", certfile, "--key-file", keyfile)
}
if cafile != "" {
args = append(args, "--ca-file", cafile)
}
if username != "" && password != "" {
args = append(args, "--username", username, "--password", password)
}