Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support insecure flag for oci pull #213

Merged
merged 3 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
da36e117d6dbc57c8ec5bab2283222fbd108db86c83389eebe045ad1ef3e2c3b helm-v3.12.0-linux-amd64.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
658839fed8f9be2169f5df68e55cb2f0aa731a50df454caf183186766800bbd0 helm-v3.12.0-linux-arm64.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
252d952b0e1b4ed2013710ddedf687ed5545d9f95a4fd72de0ff9617ff69155c helm-v3.12.0-linux-ppc64le.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
727474fb1684aa2349a77c54340c11ff09b19862d972c2403185fb163fec13ae helm-v3.12.0-linux-s390x.tar.gz
2 changes: 1 addition & 1 deletion hack/tool-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Use ./hack/installers/checksums/add-helm-checksums.sh and
# add-kustomize-checksums.sh to help download checksums.
###############################################################################
helm3_version=3.10.3
helm3_version=3.12.0
kubectl_version=1.17.8
kubectx_version=0.6.3
kustomize4_version=4.5.7
Expand Down
2 changes: 1 addition & 1 deletion util/helm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (c *nativeHelmChart) ExtractChart(chart string, version string, passCredent
}

// 'helm pull' ensures that chart is downloaded into temp directory
_, err = helmCmd.PullOCI(c.repoURL, chart, version, tempDest)
_, err = helmCmd.PullOCI(c.repoURL, chart, version, tempDest, c.creds)
if err != nil {
return "", nil, err
}
Expand Down
14 changes: 7 additions & 7 deletions util/helm/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,15 @@ func (c *Cmd) Fetch(repo, chartName, version, destination string, creds Creds, p
return c.run(args...)
}

func (c *Cmd) PullOCI(repo string, chart string, version string, destination string) (string, error) {
return c.run(
"pull",
fmt.Sprintf("oci://%s/%s", repo, chart),
"--version",
func (c *Cmd) PullOCI(repo string, chart string, version string, destination string, creds Creds) (string, error) {
args := []string{"pull", fmt.Sprintf("oci://%s/%s", repo, chart), "--version",
version,
"--destination",
destination,
)
destination}
if creds.InsecureSkipVerify && c.insecureSkipVerifySupported {
args = append(args, "--insecure-skip-tls-verify")
}
return c.run(args...)
}

func (c *Cmd) dependencyBuild() (string, error) {
Expand Down