-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a default value for MaxReleaseHistory #291
base: main
Are you sure you want to change the base?
Conversation
I think this is a good change. However, changing this default would be a breaking change for anyone that requires more than 10 releases in history, especially since we've explicitly documented via GoDoc that I don't know if there are any such users, but I also don't know that there aren't. Given that we are still pre-1.0, there is nothing stopping us from making this breaking change. But we should definitely remember to call it out specifically in the release notes and make sure the next tag is a minor version bump. @Jay-Madden are you using helm-operator-plugins as a library? If so, you should be able to implement a separate default in your code in the meantime. |
@joelanford Yep we have already specified the max to 5 in our operator, it removed nearly 5000 secret objects lol. This PR is just us trying to give back and set a sane default to prevent others from seeing the same problematic behavior. |
@joelanford @varshaprasad96 finally got around to updating the tests, should be good to go now |
}) | ||
It("should allow setting the history to unlimited", func() { | ||
Expect(WithMaxReleaseHistory(0)(r)).To(Succeed()) | ||
Expect(r.maxHistory).To(Equal(0)) | ||
Expect(r.maxReleaseHistory).To(PointTo(Equal(0))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there some place that we can test that the default value is 10 when WithMaxReleaseHistory()
is not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked briefly and didnt see anywhere, ill take a closer look and write a new spec if i have to
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Currently the default for MaxReleaseHistory is 0 which translates to no maximum meaning all helm releases will be kept around indefinitely which is wasteful and unneeded as a default.
Open Question: What should the default be? 10 seems high to me...