Skip to content

helm lint should validate chart is using lowercase letters #7672

Closed

Description

@wallyqs

Currently when creating an index for a repo and packaging it, the name can end up in an invalid name:

helm install nats/NATS nats
Error: create: failed to create: Secret "sh.helm.release.v1.NATS-1582586379.v1" is invalid: metadata.name: Invalid value: "sh.helm.release.v1.NATS-1582586379.v1": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

Although helm lint shows no errors from the chart related to name being in uppercase:

helm lint
==> Linting .
[INFO] Chart.yaml: icon is recommended

1 chart(s) linted, 0 chart(s) failed

Output of helm version:

 helm version
version.BuildInfo{Version:"v3.0.3", GitCommit:"ac925eb7279f4a6955df663a0128044a8a6b7593", GitTreeState:"clean", GoVersion:"go1.13.7"}

Output of kubectl version:

kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-20T04:49:16Z", GoVersion:"go1.12.6", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.10-eks-aae39f", GitCommit:"aae39f4697508697bf16c0de4a5687d464f4da81", GitTreeState:"clean", BuildDate:"2019-12-23T08:19:12Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

Activity

  1. wallyqs commented on Feb 25, 2020

    @wallyqs
    Author

    Possibly related to #6477

  2. mattfarina commented on Feb 25, 2020

    @mattfarina
    Collaborator

    This may be related to the order or arguments at the command line. At the Helm CLI it should be...

    $ helm install [NAME] [CHART]
    

    In the case above it looks like the name and chart are transposed.

  3. technosophos commented on Apr 21, 2020

    @technosophos
    Member

    If anyone wants to add a lint target for this, PRs are welcome.

  4. technosophos commented on Apr 27, 2020

    @technosophos
    Member

    I have now added a fix for this in #8011.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions