Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helm push not putting quotes around scientific notation like numbers #40

Closed
karuppiah7890 opened this issue Dec 4, 2019 · 0 comments · Fixed by #41
Closed

helm push not putting quotes around scientific notation like numbers #40

karuppiah7890 opened this issue Dec 4, 2019 · 0 comments · Fixed by #41

Comments

@karuppiah7890
Copy link
Contributor

With helm 2.16.1, helm-push 0.7.1 and chartmuseum 0.10.0, try the below

$ helm create old-chart
$ # change appVersion in Chart.yaml to "722225e2"
$ vi old-chart/Chart.yaml
$ # now push the chart to chartmuseum repo called "local"
$ helm push old-chart local
$ # check the index.yaml
$ curl http://localhost:8080/index.yaml
apiVersion: v1
entries:
old-chart:

  • apiVersion: v1
    appVersion: "7.22225e+07"
    created: "2019-12-04T22:16:19.562137212+05:30"
    description: A Helm chart for Kubernetes
    digest: 0b891b622bd0ab3e8e22302dab504481d10887a011bb92f38830097c44b3ccd3
    name: old-chart
    urls:
    • charts/old-chart-0.1.0.tgz
      version: 0.1.0
      generated: "2019-12-04T22:16:22+05:30"
      serverInfo: {}

Now if you see the appVersion, you notice that it's in some scientific notation form. This does not happen when directly curl is used to push charts this way -

$ helm package old-chart
$ # check the tar ball Chart.yaml, it will still be "722225e2" 
$ vi old-chart-0.1.0.tgz
$ curl --data-binary "@old-chart-0.1.0.tgz" http://localhost:8080/api/charts

The issue is in helm-push. When push is done, the chart contents are read (parsed), and then later pushed to chartmuseum. While parsing and then serializing, it removes the quotes (due to a yaml package bug) and then it pushes to the chartmusem, where the number is made into a string and put in double quotes, but it's converted a bit, compared to the original string

Updating yaml package to latest version solves the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant