helm: Recreate flag does not work for rollback in the SDK

This is about the Helm Go SDK. I’m attempting a rollback programmatically.

Sample code

	rollback := action.NewRollback(actionConfig)
	rollback.Version = targetV
	rollback.Recreate = true
	rollback.Wait = true
	rollback.WaitForJobs = true
	rollback.Timeout = time.Duration(5) * time.Minute

The Recreate flag is set to true, the chart gets rolled back to the previous version (targetV is defined previously) but the pods do not get recreated.

However, the flag --recreate-pods flag works as expected in the helm rollback CLI command. I thought the CLI tool also uses the same codebase, so the behaviour should be identical.

What am I doing wrong?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (11 by maintainers)

Most upvoted comments

@talonx I think this is a sdk bug. I will try fix it.