feat: set Revision history limit params#508
Conversation
plaffitt
left a comment
There was a problem hiding this comment.
Hi @rverchere, thanks for the contribution! revisionHistoryLimit is a useful addition and the feature itself is well-placed in the chart. A few things need to be addressed before this can be merged:
1. The default value of 10 causes an unintended breaking change
Setting revisionHistoryLimit: 10 in values.yaml means every existing deployment of this chart would have revisionHistoryLimit: 10 added to their rendered manifests on the next helm upgrade, even for users who never asked for this option. For teams using GitOps tools (Argo CD, Flux), this would show up as an unexpected diff. 10 is also already the Kubernetes default, so it's redundant.
The right default here is null (i.e. leave the field absent from values.yaml, or set it explicitly to null). The template should then only emit the field when the user has explicitly configured it, following the same opt-in pattern used by other optional scalar fields in this chart. The README documentation should reflect null as the default, not 10.
2. {{- with revisionHistoryLimit }} silently breaks for value 0
In Go/Helm templates, with 0 evaluates as falsy, so revisionHistoryLimit: 0 would be silently ignored and the field would not be emitted at all. The existing chart already handles this correctly for metricLabelsFilterList using {{- if not (kindIs "invalid" .Values.xxx) }}. The same guard should be used here, both in deployment.yaml and daemonset.yaml.
Happy to discuss any of these points. The core feature is the right approach; it just needs these rough edges smoothed out.
cb8577a to
97c8ee5
Compare
97c8ee5 to
083b6c6
Compare
|
🎉 This PR is included in version 3.20.0-beta.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 3.20.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Closes #507