Skip to content

fix: keep generated release names within the 53 character Helm limit - #889

Open
vignesh2027 wants to merge 1 commit into
helm:mainfrom
vignesh2027:fix/release-name-max-length
Open

vignesh2027 wants to merge 1 commit into
helm:mainfrom
vignesh2027:fix/release-name-max-length

Conversation

@vignesh2027

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

CreateInstallParams cut 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 failed ct install with 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.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant