Repository navigation
feat(deployer): configurable Helm release history (HELM_HISTORY_MAX) (#676) - #712
Merged
Merged
Conversation
…676) - New setting HELM_HISTORY_MAX (config.ParseHelmHistoryMax): passed as --history-max to every helm upgrade --install and helm rollback through HelmClient.WithHistoryMax, set by the cluster registry for each cluster. - Unset: no flag, so the Helm default (10) applies and the commands are unchanged. 0, 1, a negative number or text stops the start with an error that names the setting: the plain rollback needs the previous revision. A rollback to a target log uses the stored values and chart version, so it needs no older revision. - Helm chart: backend.helmHistoryMax (default null), rendered as HELM_HISTORY_MAX only when set; a value below 2 fails the render, and an explicit backend.env value wins. make helm-test covers it. - Docs: README and backend README tables, WIKI rollback, chart and domain references. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #676.
What it does
HELM_HISTORY_MAX(config.ParseHelmHistoryMax). It is passed as--history-max <n>to everyhelm upgrade --installandhelm rollback.HelmClientand sets the limit withHelmClient.WithHistoryMax. The streaming executor embeds the client, so deploy, redeploy, quick deploy, rollback to a target and plain rollback all get it.HELM_MAX_HISTORYenvironment variable, else 10.0,1, a negative number or text stops the start with an error that names the setting.backend.helmHistoryMax(defaultnull) rendersHELM_HISTORY_MAXonly when it is set.--set-jsonare converted to integers first.backend.env.HELM_HISTORY_MAXwins.README.md,backend/README.md, theWIKI.mdrollback section,values.yaml,docs/claude/helm-chart.md,docs/claude/domain.md,backend/CLAUDE.mdand.github/copilot-instructions.md.Behaviour change: with a small limit, Helm keeps the last deployed revision when it prunes. After several failed deploys in a row, a plain rollback goes to the last good revision instead of an older failed one.
Tested on a local cluster (Docker Desktop Kubernetes, the backend image with Helm 3.22.1, a one-chart
podinfostack)HELM_HISTORY_MAX=3, 5 deploysHELM_HISTORY_MAX=2HELM_HISTORY_MAX=1at startinvalid configuration: HELM_HISTORY_MAX must be a whole number of 2 or more, got "1"Other checks
LoadConfigerrors, the install and rollback arguments with and without a limit (including the streaming executor), and the registry wiring.go test ./... -short -racemake lint(0 errors)make gosec(0 issues)make helm-test: new checks for the default, a set value, the env override, numbers from--set-json, and failures that must show thebackend.helmHistoryMaxmessagemake helm-lint🤖 Generated with Claude Code