Skip to content

Resource names exceed the 63-char limit with long release/override names #638

Description

@laurall974

Several templates use a fullname helper's output as a prefix and append suffixes. Truncation happens inside the helper, before the suffix is appended, so final resource names can exceed the 63-character Kubernetes name limit.

Reproduction:

helm template $(printf 'r%.0s' {1..30}) . --set nameOverride=longvaluehere \
  | grep -nE 'name:' \
  | awk '{ for(i=1;i<=NF;i++) if(length($i)>63) print length($i), $0 }'

This prints ~20 names over 63 chars, in three groups:

  1. KMM subchart (kmm.fullname) e.g. -kmm-event-recorder-clusterrolebinding. Longest appended suffix: -event-recorder-clusterrolebinding (34 chars).

  2. Top-level gpu-operator chart e.g. -event-recorder-clusterrolebinding, -metrics-exporter-rbac-proxy, -leader-election-rolebinding. Same root cause in the top-level fullname helper.

  3. node-feature-discovery dependency -node-feature-discovery-{master,worker}-conf. Originates in the NFD subchart; likely not fixable in this repo.

You can see an example here.

Solutions

Possible solution: reserve room for the longest suffix in the fullname helpers, shorten the resource-name suffixes, or append a short hash to preserve uniqueness. Happy to implement a fix if needed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions