Skip to content

Add support for setting --history-max on existing clusters - #5867

Closed
rossf7 wants to merge 2 commits into
helm:masterfrom
rossf7:issue-3414
Closed

rossf7 wants to merge 2 commits into
helm:masterfrom
rossf7:issue-3414

Conversation

@rossf7

@rossf7 rossf7 commented Jun 10, 2019

Copy link
Copy Markdown

What this PR does / why we need it:

This PR sets --history-max on existing clusters. It is a replacement for #3454 and includes the unit tests added in af316d3. I've tested locally and is working OK.

closes #3414

Special notes for your reviewer:

I changed the unit tests in af316d3 quite a lot to try and sync them with the other tests. The code change is basically unchanged from the original PR.

If applicable:

  • this PR contains documentation
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

@helm-bot helm-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 10, 2019
}
obj.Spec.Template.Spec.Containers[0].Image = opts.SelectImage()
obj.Spec.Template.Spec.Containers[0].ImagePullPolicy = opts.pullPolicy()
if opts.MaxHistory > 0 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how would a user unset this value?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. If opts.MaxHistory is not set should we revert to the default of 0?

@bacongobbler I'd appreciate hearing what you think is the best approach? Thanks!

}
obj.Spec.Template.Spec.Containers[0].Image = opts.SelectImage()
obj.Spec.Template.Spec.Containers[0].ImagePullPolicy = opts.pullPolicy()
if opts.MaxHistory > 0 {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. If opts.MaxHistory is not set should we revert to the default of 0?

@bacongobbler I'd appreciate hearing what you think is the best approach? Thanks!


// updateEnv updates the existing env vars and allows env vars to be removed
// by name.
func updateEnv(existing []v1.EnvVar, env []v1.EnvVar, remove []string) []v1.EnvVar {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this came from the previous PR and I have a doubt now. Do we need to be able to remove env vars?

As doesn't TILLER_HISTORY_MAX always need to be set.

@alexcurtin

Copy link
Copy Markdown

Any update on this?

@bacongobbler

bacongobbler commented Oct 3, 2019 •

Copy link
Copy Markdown
Member

Hey @alexcurtin, thanks for the ping.

Unfortunately, we won't be able to get this feature into 2.15, which will be the last feature release for Helm 2. Because Tiller is no longer present in Helm 3, it is hard to justify larger changes (which could incur support overhead) to that subsystem.

The good news is that workarounds exist, and because Tiller is not present in Helm 3, when you've upgraded you should no longer need this workaround.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set --history-max on a already deployed cluster

4 participants