Skip to content

Release Name DNS-1123 - Why only support lowercase when uppercase is just as valid? #6477

Closed

Description

@MMeent

The validating regex for release names is [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*. This, I understand.

According to section 2.1 - Host Names and Numbers, the syntax of a legal host name is as specified in RFC-952, with the additional exceptions for allowing a letter or a digit as the first character and requiring support for at least 63 characters in a host name.

RFC-952 specifies that 'A "name" (Net, Host, Gateway, or Domain name) is a text string up to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus sign (-), and period (.). Note that periods are only allowed when they serve to delimit components of "domain style names". (See RFC-921, "Domain Name System Implementation Schedule", for background). No blank or space characters are permitted as part of a name. No distinction is made between upper and lower case. '

Understanding this, it appears that upper-cased letters are allowed in hostnames according to RFC-1123. Then, why does helm add additional requirements whilst citing RFC-1123 as the source of the requirement, even through it is most definately not? Even kubernetes allows cased values in DNS label-restricted fields (e.g. .metadata.labels values)

Activity

  1. dramich commented on Sep 24, 2019

    @dramich

    @MMeent This is not a helm thing but really a kubernetes thing. You can see here they acknowledge it's a k8s requirement and not to blame the RFC for this requirement.

    I think you misunderstand the example you point to in labels. Labels keys are actually two parts, a DNS subdomain prefix follow by a suffix. The DNS subdomain prefix must be lower case, the suffix is of a users choosing. For example Foo/bar=baz is not valid and will throw the error prefix part a DNS-1123 subdomain must consist of lower case alphanumeric characters... while Foo=baz is valid as it does not have a prefix followed by a /.

  2. MMeent commented on Sep 24, 2019

    @MMeent
    Author

    I admit I misread the label example, but still, why mention "DNS-1123" at all when it is not compatible with seemingly mentioned RFC-1123 DNS names?

  3. BogdanMaier commented on May 14, 2020

    @BogdanMaier

    Another possible cause for this error was in my case a miss-aligned list in the .yml config.

  4. ch3t commented on Jul 24, 2020

    @ch3t

    Can confirm that helm lint <chart_name> doesn't catch these errors which are only caught in the CI/CD pipelines during helm install

    Seeing errors like
    Invalid value: "service_user_account": a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions