fix(argo-cd): Preserve component suffixes for long release names#3887
Open
ystkfujii wants to merge 1 commit into
Open
fix(argo-cd): Preserve component suffixes for long release names#3887ystkfujii wants to merge 1 commit into
ystkfujii wants to merge 1 commit into
Conversation
Signed-off-by: ystkfujii <ystk.fujii0731@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.
Summary
This PR fixes resource name rendering for the
argo-cdchart when using long Helm release names.Previously, some resources appended suffixes such as
-metrics,-grpc, or-health-configmapafter rendering the component fullname. With long release names, this could either exceed Kubernetes name length limits or truncate away the component-specific suffix, which could lead to invalid or colliding resource names.This change adds a component-aware fullname helper that reserves space for the component suffix before truncating the base release name. It also updates metrics Services, Redis health ConfigMap references, and Argo CD server gRPC resource names to use dedicated helpers.
Closes #3840.
Upgrade impact
For normal release names, rendered resource names should remain unchanged.
For very long release names, some existing resources may be renamed because suffixes such as
repo-server,redis,metrics,grpc, andhealth-configmapare now preserved.Notes
Ideally, the helper could include a deterministic hash of the full base name to distinguish releases that share the same long prefix. This PR does not add such a hash and only preserves component suffixes while truncating the base name. If a follow-up issue is raised for collisions between multiple long release names with the same prefix, I am happy to address that separately.
I considered adding a regression test for this boundary case. If maintainers think it is necessary, I can add a small shell script that renders the chart with a 53-character release name and verifies that rendered resource names stay within the Kubernetes name length limit and do not collide, then run it as a dedicated GitHub Actions step.
Checklist: