Skip to content

Commit

Permalink
Merge pull request helm#7661 from akash-gautam/fix/issue-7452
Browse files Browse the repository at this point in the history
fix(helm): add --skip-crds flag to 'helm upgrade'
  • Loading branch information
hickeyma authored Mar 5, 2020
2 parents eaebce6 + e92a258 commit 3d288b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions cmd/helm/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
instClient.ChartPathOptions = client.ChartPathOptions
instClient.DryRun = client.DryRun
instClient.DisableHooks = client.DisableHooks
instClient.SkipCRDs = client.SkipCRDs
instClient.Timeout = client.Timeout
instClient.Wait = client.Wait
instClient.Devel = client.Devel
Expand Down Expand Up @@ -170,6 +171,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
f.BoolVar(&client.Force, "force", false, "force resource updates through a replacement strategy")
f.BoolVar(&client.DisableHooks, "no-hooks", false, "disable pre/post upgrade hooks")
f.BoolVar(&client.DisableOpenAPIValidation, "disable-openapi-validation", false, "if set, the upgrade process will not validate rendered templates against the Kubernetes OpenAPI Schema")
f.BoolVar(&client.SkipCRDs, "skip-crds", false, "if set, no CRDs will be installed when an upgrade is performed with install flag enabled. By default, CRDs are installed if not already present, when an upgrade is performed with install flag enabled")
f.DurationVar(&client.Timeout, "timeout", 300*time.Second, "time to wait for any individual Kubernetes operation (like Jobs for hooks)")
f.BoolVar(&client.ResetValues, "reset-values", false, "when upgrading, reset the values to the ones built into the chart")
f.BoolVar(&client.ReuseValues, "reuse-values", false, "when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored")
Expand Down
8 changes: 5 additions & 3 deletions pkg/action/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ type Upgrade struct {

ChartPathOptions

Install bool
Devel bool
Namespace string
Install bool
Devel bool
Namespace string
// SkipCRDs skip installing CRDs when install flag is enabled during upgrade
SkipCRDs bool
Timeout time.Duration
Wait bool
DisableHooks bool
Expand Down

0 comments on commit 3d288b9

Please sign in to comment.