mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-09 07:46:24 +02:00
Add support for --insecure-skip-tls-verify flag on helm repo add command (#1990)
Parses a new field in repositories named `skipTLSVerify` and if set to `true`, it appends `--insecure-skip-tls-verify` in `helm repo add` command. This should be useful with internal self-signed repos, mitm proxies etc. Resolves #1871
This commit is contained in:
@@ -108,7 +108,7 @@ func (helm *execer) SetHelmBinary(bin string) {
|
||||
helm.helmBinary = bin
|
||||
}
|
||||
|
||||
func (helm *execer) AddRepo(name, repository, cafile, certfile, keyfile, username, password string, managed string, passCredentials string) error {
|
||||
func (helm *execer) AddRepo(name, repository, cafile, certfile, keyfile, username, password string, managed string, passCredentials string, skipTLSVerify string) error {
|
||||
var args []string
|
||||
var out []byte
|
||||
var err error
|
||||
@@ -144,6 +144,9 @@ func (helm *execer) AddRepo(name, repository, cafile, certfile, keyfile, usernam
|
||||
if passCredentials == "true" {
|
||||
args = append(args, "--pass-credentials")
|
||||
}
|
||||
if skipTLSVerify == "true" {
|
||||
args = append(args, "--insecure-skip-tls-verify")
|
||||
}
|
||||
helm.logger.Infof("Adding repo %v %v", name, repository)
|
||||
out, err = helm.exec(args, map[string]string{})
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user