Skip to content

Commit

Permalink
fix(helm): helm v3 doesn't have these flags (#11100) (#11540)
Browse files Browse the repository at this point in the history
* fix: helm v3 doesn't have these flags

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Revert repoAdd change. Was to greedy, ca-file is needed there

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
  • Loading branch information
alexef authored and crenshaw-dev committed Dec 7, 2022
1 parent 186c4be commit fca6271
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions util/helm/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,26 +87,6 @@ func (c *Cmd) RegistryLogin(repo string, creds Creds) (string, error) {
args = append(args, "--password", creds.Password)
}

if creds.CAPath != "" {
args = append(args, "--ca-file", creds.CAPath)
}
if len(creds.CertData) > 0 {
filePath, closer, err := writeToTmp(creds.CertData)
if err != nil {
return "", err
}
defer io.Close(closer)
args = append(args, "--cert-file", filePath)
}
if len(creds.KeyData) > 0 {
filePath, closer, err := writeToTmp(creds.KeyData)
if err != nil {
return "", err
}
defer io.Close(closer)
args = append(args, "--key-file", filePath)
}

if creds.InsecureSkipVerify {
args = append(args, "--insecure")
}
Expand All @@ -117,26 +97,6 @@ func (c *Cmd) RegistryLogout(repo string, creds Creds) (string, error) {
args := []string{"registry", "logout"}
args = append(args, repo)

if creds.CAPath != "" {
args = append(args, "--ca-file", creds.CAPath)
}
if len(creds.CertData) > 0 {
filePath, closer, err := writeToTmp(creds.CertData)
if err != nil {
return "", err
}
defer io.Close(closer)
args = append(args, "--cert-file", filePath)
}
if len(creds.KeyData) > 0 {
filePath, closer, err := writeToTmp(creds.KeyData)
if err != nil {
return "", err
}
defer io.Close(closer)
args = append(args, "--key-file", filePath)
}

return c.run(args...)
}

Expand Down

0 comments on commit fca6271

Please sign in to comment.