api: change `MaxHistory` default to `5`

As anything beyond ~3 releases has no real value to the controller
itself, while the time it takes to perform a release increases with
the number of releases kept in history.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This commit is contained in:
Hidde Beydals 2023-11-17 01:17:06 +01:00
parent c5a017cb76
commit 533589ce39
No known key found for this signature in database
GPG Key ID: 979F380FC2341744
3 changed files with 6 additions and 6 deletions

View File

@ -132,7 +132,7 @@ type HelmReleaseSpec struct {
Timeout *metav1.Duration `json:"timeout,omitempty"`
// MaxHistory is the number of revisions saved by Helm for this HelmRelease.
// Use '0' for an unlimited number of revisions; defaults to '10'.
// Use '0' for an unlimited number of revisions; defaults to '5'.
// +optional
MaxHistory *int `json:"maxHistory,omitempty"`
@ -1075,10 +1075,10 @@ func (in HelmRelease) GetTimeout() metav1.Duration {
return *in.Spec.Timeout
}
// GetMaxHistory returns the configured MaxHistory, or the default of 10.
// GetMaxHistory returns the configured MaxHistory, or the default of 5.
func (in HelmRelease) GetMaxHistory() int {
if in.Spec.MaxHistory == nil {
return 10
return 5
}
return *in.Spec.MaxHistory
}

View File

@ -1227,7 +1227,7 @@ spec:
maxHistory:
description: MaxHistory is the number of revisions saved by Helm for
this HelmRelease. Use '0' for an unlimited number of revisions;
defaults to '10'.
defaults to '5'.
type: integer
persistentClient:
description: "PersistentClient tells the controller to use a persistent

View File

@ -208,7 +208,7 @@ int
<td>
<em>(Optional)</em>
<p>MaxHistory is the number of revisions saved by Helm for this HelmRelease.
Use &lsquo;0&rsquo; for an unlimited number of revisions; defaults to &lsquo;10&rsquo;.</p>
Use &lsquo;0&rsquo; for an unlimited number of revisions; defaults to &lsquo;5&rsquo;.</p>
</td>
</tr>
<tr>
@ -1060,7 +1060,7 @@ int
<td>
<em>(Optional)</em>
<p>MaxHistory is the number of revisions saved by Helm for this HelmRelease.
Use &lsquo;0&rsquo; for an unlimited number of revisions; defaults to &lsquo;10&rsquo;.</p>
Use &lsquo;0&rsquo; for an unlimited number of revisions; defaults to &lsquo;5&rsquo;.</p>
</td>
</tr>
<tr>