diff --git a/main.go b/main.go index d3126f0..167672e 100644 --- a/main.go +++ b/main.go @@ -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", @@ -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"), diff --git a/plugin/plugin.go b/plugin/plugin.go index 4a3d60a..9e2e417 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -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"` @@ -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") }