feat: update repo Spec var type skipTLSVerify to bool (#877)

* feat: update repo Spec var type skipTLSVerify to bool

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2023-06-01 12:05:53 +08:00
committed by GitHub
parent d9e303befa
commit e8f9bbbf9d
8 changed files with 30 additions and 37 deletions
+2 -2
View File
@@ -148,7 +148,7 @@ func (helm *execer) SetDisableForceUpdate(forceUpdate bool) {
helm.options.DisableForceUpdate = forceUpdate
}
func (helm *execer) AddRepo(name, repository, cafile, certfile, keyfile, username, password string, managed string, passCredentials string, skipTLSVerify string) error {
func (helm *execer) AddRepo(name, repository, cafile, certfile, keyfile, username, password string, managed string, passCredentials string, skipTLSVerify bool) error {
var args []string
var out []byte
var err error
@@ -184,7 +184,7 @@ func (helm *execer) AddRepo(name, repository, cafile, certfile, keyfile, usernam
if passCredentials == "true" {
args = append(args, "--pass-credentials")
}
if skipTLSVerify == "true" {
if skipTLSVerify {
args = append(args, "--insecure-skip-tls-verify")
}
helm.logger.Infof("Adding repo %v %v", name, repository)