Repository navigation
fix: keep generated release names within the 53 character Helm limit - #889
Open
vignesh2027 wants to merge 1 commit into
Open
vignesh2027 wants to merge 1 commit into
vignesh2027 wants to merge 1 commit into
Conversation
CreateInstallParams truncated the generated release name to 63 characters, which is the Kubernetes namespace limit. Helm rejects release names longer than 53 characters, so charts whose directory name is longer than about 42 characters failed to install with an invalid release name error. Truncate the release name to 53 characters and keep the namespace at 63. The random suffix is at the end and is still preserved. Signed-off-by: vigneshwar <applemacbook6sep2004@gmail.com>
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.
What this PR does / why we need it:
CreateInstallParamscut the generated release name to 63 characters, which is the Kubernetes namespace limit. Helm only accepts release names up to 53 characters, so a chart whose directory name is longer than about 42 characters failedct installwith an invalid release name error.This truncates the release name to 53 characters and leaves the namespace at 63. The random suffix sits at the end and is still kept.
Which issue this PR fixes: see #343 (closed as stale)
Special notes for your reviewer:
The new test builds a chart with a 60 character directory name and checks both lengths. It fails on main with 63 against the 53 limit.