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 fetch fails on chart with special character in version #158

Closed
bzbikowski opened this issue Mar 16, 2022 · 0 comments · Fixed by #204
Closed

helm fetch fails on chart with special character in version #158

bzbikowski opened this issue Mar 16, 2022 · 0 comments · Fixed by #204
Assignees
Labels
Milestone

Comments

@bzbikowski
Copy link

Hi,

I've run into an issue with helm fetch/install when I've tried to access the chart with a special character in its version, in my case plus sign ('+'). Helm search was working without issue but fetch/install was throwing 404 error. The helm repo in the S3 bucket was set using the helm-s3 plugin, the chart was pushed using the plugin, but the repo in helm was set using the HTTPS path, not s3://bucket-name/path.

Reason:
S3 expects that some of the special characters will be encoded in the URL when trying to access the files over HTTP.
For example, '+' in the URL must be changed to '%2B'.
GET https://s3.Region.amazonaws.com/bucket-name/charts/chart-1.0.0+100.tgz -> 404 Not Found
GET https://s3.Region.amazonaws.com/bucket-name/charts/chart-1.0.0%2B100.tgz -> 200 Ok

Solution:
During artifact push, when updating index.yaml file, encode in URL section special characters (only tested on '+', the list might be bigger, it might be connected to https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html).

Steps to reproduce:

  1. Create a bucket and init a helm repo with helm-s3 plugin
  2. Change the version of your chart to include a special character (in my case '+') e.g. 1.0.0+100
  3. Build and push this chart to the bucket using helm-s3 plugin
  4. Add repo using path-style URL e.g. https://s3.Region.amazonaws.com/bucket-name/charts
  5. Fetch chart from HTTPS repo

Environment:
Helm version: v3.8.0
Helm-s3 plugin version: v.0.10.0

@hypnoglow hypnoglow self-assigned this Aug 21, 2022
@hypnoglow hypnoglow added this to the 0.14.0 milestone Aug 21, 2022
@hypnoglow hypnoglow added the bug label Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants