From bc404062965e381010747c737d890b96f68021db Mon Sep 17 00:00:00 2001 From: Liu Ming Date: Fri, 17 Jul 2020 10:30:33 +0800 Subject: [PATCH] fix: set --force default value as true for helm rollback One solution for issue #8465: make the default behaviour to replace the resouces rather than make a patch, keep the backend compatibility. Another solution, see PR: #8473, #8474 fix: #8465 Signed-off-by: Liu Ming --- cmd/helm/rollback.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/rollback.go b/cmd/helm/rollback.go index 2cd6fa2cb..c89cbf4f0 100644 --- a/cmd/helm/rollback.go +++ b/cmd/helm/rollback.go @@ -78,7 +78,7 @@ func newRollbackCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { f := cmd.Flags() f.BoolVar(&client.DryRun, "dry-run", false, "simulate a rollback") f.BoolVar(&client.Recreate, "recreate-pods", false, "performs pods restart for the resource if applicable") - f.BoolVar(&client.Force, "force", false, "force resource update through delete/recreate if needed") + f.BoolVar(&client.Force, "force", true, "force resource update through delete/recreate if true, otherwise make a patch to the current resource by the three way merge result") f.BoolVar(&client.DisableHooks, "no-hooks", false, "prevent hooks from running during rollback") f.DurationVar(&client.Timeout, "timeout", 300*time.Second, "time to wait for any individual Kubernetes operation (like Jobs for hooks)") 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")