feat(charts): add revisionHistoryLimit to deployment#4639
feat(charts): add revisionHistoryLimit to deployment#4639zyzzmohit wants to merge 1 commit intokubernetes-sigs:mainfrom
Conversation
|
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zyzzmohit The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @zyzzmohit! |
There was a problem hiding this comment.
Pull request overview
Adds configurable revisionHistoryLimit to the Headlamp Helm chart Deployment so operators can control how many old ReplicaSets are retained (defaulting to 10), and bumps the chart version accordingly.
Changes:
- Introduces
revisionHistoryLimitinvalues.yaml(default: 10). - Renders
spec.revisionHistoryLimitin the Deployment template from the new value. - Bumps chart version to
0.40.1.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| charts/headlamp/values.yaml | Adds revisionHistoryLimit value and includes some YAML formatting cleanups. |
| charts/headlamp/templates/deployment.yaml | Applies the new .Values.revisionHistoryLimit to Deployment spec. |
| charts/headlamp/Chart.yaml | Bumps chart version to 0.40.1. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| {{- end }} | ||
| spec: | ||
| replicas: {{ .Values.replicaCount }} | ||
| revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} |
There was a problem hiding this comment.
Adding revisionHistoryLimit to the Deployment changes the rendered manifests, but the Helm chart snapshot tests under charts/headlamp/tests/expected_templates/ still reflect the old output. Update the expected templates (and ideally add a test case exercising a non-default override) so CI doesn’t fail and the new value is covered.
| - name: kinvolk | ||
| url: https://kinvolk.io/ | ||
| version: 0.40.0 | ||
| version: 0.40.1 |
There was a problem hiding this comment.
The chart version was bumped to 0.40.1, which will change the rendered helm.sh/chart label and will cause the Helm chart snapshot tests in charts/headlamp/tests/expected_templates/ to fail unless they are regenerated/updated. Please update the expected templates to match the new chart version.
illume
left a comment
There was a problem hiding this comment.
Please check the commit messages match the commit guidelines in the contributing guide? See git log for examples.
Signed-off-by: zyzzmohit <mohitray949@gmail.com>
a145ae6 to
9f9a678
Compare
Thanks for the review @illume! I've updated the PR: Rebased on latest main and squashed into a single commit |
Summary
This PR adds the
revisionHistoryLimitconfiguration to the Helm chart. This allows users to control the number of old ReplicaSets retained by the Deployment, preventing accumulation of unused resources (defaulting to 10).Related Issue
Fixes #4638
Changes
revisionHistoryLimitto values.yaml (default: 10)0.40.1Steps to Test
helm template . | grep revisionHistoryLimitto verify default value (10).helm template . --set revisionHistoryLimit=5 | grep revisionHistoryLimitto verify override works.