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

Remove helm repo update #507

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 0 additions & 5 deletions pkg/helm/charts.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ func (c Charts) Vendor() error {
return err
}

log.Println("Syncing Repositories ...")
if err := c.Helm.RepoUpdate(Opts{Repositories: c.Manifest.Repositories}); err != nil {
return err
}

log.Println("Pulling Charts ...")
for _, r := range c.Manifest.Requires {
chartName := parseReqName(r.Chart)
Expand Down
26 changes: 0 additions & 26 deletions pkg/helm/helm.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package helm

import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/exec"
Expand All @@ -16,9 +14,6 @@ type Helm interface {
// Pull downloads a Helm Chart from a remote
Pull(chart, version string, opts PullOpts) error

// RepoUpdate fetches the latest remote index
RepoUpdate(opts Opts) error

// Template returns the individual resources of a Helm Chart
Template(name, chart string, opts TemplateOpts) (manifest.List, error)
}
Expand Down Expand Up @@ -57,27 +52,6 @@ func (e ExecHelm) Pull(chart, version string, opts PullOpts) error {
return cmd.Run()
}

// RepoUpdate implements Helm.RepoUpdate
func (e ExecHelm) RepoUpdate(opts Opts) error {
repoFile, err := writeRepoTmpFile(opts.Repositories)
if err != nil {
return err
}
defer os.Remove(repoFile)

cmd := e.cmd("repo", "update",
"--repository-config", repoFile,
)
var errBuf bytes.Buffer
cmd.Stderr = &errBuf

if err := cmd.Run(); err != nil {
return fmt.Errorf("%s\n%s", errBuf.String(), err)
}

return nil
}

// cmd returns a prepared exec.Cmd to use the `helm` binary
func (e ExecHelm) cmd(action string, args ...string) *exec.Cmd {
argv := []string{action}
Expand Down