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

added skip-refresh flag #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ func main() {
Usage: "if set, it will initilises helm in the client side only",
EnvVar: "PLUGIN_CLIENT_ONLY,CLIENT_ONLY",
},
cli.BoolFlag{
Name: "skip-refresh",
Usage: "if set, it will not refresh (download) the local repository cache",
EnvVar: "PLUGIN_SKIP_REFRESH,SKIP_REFRESH",
},
cli.BoolFlag{
Name: "reuse-values",
Usage: "when upgrading, reuse the last release's values, and merge in any new values",
Expand Down Expand Up @@ -183,6 +188,7 @@ func run(c *cli.Context) error {
Wait: c.Bool("wait"),
RecreatePods: c.Bool("recreate-pods"),
ClientOnly: c.Bool("client-only"),
SkipRefresh: c.Bool("skip-refresh"),
CanaryImage: c.Bool("canary-image"),
Upgrade: c.Bool("upgrade"),
ReuseValues: c.Bool("reuse-values"),
Expand Down
4 changes: 4 additions & 0 deletions plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type (
Upgrade bool `json:"upgrade"`
CanaryImage bool `json:"canary_image"`
ClientOnly bool `json:"client_only"`
SkipRefresh bool `json:"skip_refresh"`
ReuseValues bool `json:"reuse_values"`
Timeout string `json:"timeout"`
Force bool `json:"force"`
Expand Down Expand Up @@ -201,6 +202,9 @@ func doHelmInit(p *Plugin) []string {
if p.Config.ClientOnly {
init = append(init, "--client-only")
}
if p.Config.SkipRefresh {
init = append(init, "--skip-refresh")
}
if p.Config.Upgrade {
init = append(init, "--upgrade")
}
Expand Down