Skip to content

fix(argo-cd): Preserve component suffixes for long release names#3887

Open
ystkfujii wants to merge 1 commit into
argoproj:mainfrom
ystkfujii:fix/prevent_resource_name_collision
Open

fix(argo-cd): Preserve component suffixes for long release names#3887
ystkfujii wants to merge 1 commit into
argoproj:mainfrom
ystkfujii:fix/prevent_resource_name_collision

Conversation

@ystkfujii

Copy link
Copy Markdown
Contributor

Summary

This PR fixes resource name rendering for the argo-cd chart when using long Helm release names.

Previously, some resources appended suffixes such as -metrics, -grpc, or -health-configmap after 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, and health-configmap are 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:

  • I have bumped the chart version according to versioning
  • I have updated the documentation according to documentation
  • I have updated the chart changelog with all the changes that come with this pull request according to changelog.
  • Any new values are backwards compatible and/or have sensible default.
  • I have signed off all my commits as required by DCO.
  • I have created a separate pull request for each chart according to pull requests
  • My build is green (troubleshooting builds).

Signed-off-by: ystkfujii <ystk.fujii0731@gmail.com>
@ystkfujii ystkfujii marked this pull request as ready for review May 12, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to install Argo CD Helm Chart with long release name (and metrics enabled)

1 participant