From c018ad60a23044bcb1d5f34573d637fb85aaf9da Mon Sep 17 00:00:00 2001 From: Reinhard Naegele Date: Thu, 12 Sep 2019 19:39:28 +0200 Subject: [PATCH] Set history-max to 10 by default It makes sense to limit the history by default. Setting it to 10 aligns with the default for a ReplicaSet's `revisionHistoryLimit`. Fixes: #5157 Signed-off-by: Reinhard Naegele --- cmd/helm/upgrade.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index d679c7c79..3db7f561c 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -153,7 +153,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { 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.") f.BoolVar(&client.Wait, "wait", false, "if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as successful. It will wait for as long as --timeout") f.BoolVar(&client.Atomic, "atomic", false, "if set, upgrade process rolls back changes made in case of failed upgrade. The --wait flag will be set automatically if --atomic is used") - f.IntVar(&client.MaxHistory, "history-max", 0, "limit the maximum number of revisions saved per release. Use 0 for no limit.") + f.IntVar(&client.MaxHistory, "history-max", 10, "limit the maximum number of revisions saved per release. Use 0 for no limit.") addChartPathOptionsFlags(f, &client.ChartPathOptions) addValueOptionsFlags(f, valueOpts)