Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

Github relative links break in Hub #62

Open
earnubs opened this issue Feb 8, 2019 · 7 comments
Open

Github relative links break in Hub #62

earnubs opened this issue Feb 8, 2019 · 7 comments

Comments

@earnubs
Copy link
Contributor

earnubs commented Feb 8, 2019

https://hub.kubeapps.com/charts/stable/kong

Tip: You can use the default values.yaml

values.yaml is a 404

@andresmgot
Copy link
Contributor

should this be fixed in the app readme?

@earnubs
Copy link
Contributor Author

earnubs commented Feb 8, 2019

@andresmgot I don't think so, it's correct for Github. Maybe our markdown processor could find relative links and make them absolute to the source?

@andresmgot
Copy link
Contributor

The problem is that not always the chart information contains a git source of the chart, and when it does it may refer to a different repository or not contain the full path to the chart so we have no way to construct the full path.

@prydonius
Copy link
Contributor

Yeah, unfortunately this is tricky, but chartsvc does extract the values.yaml file, and so maybe we can specifically look for values.yaml links and update them to the chartsvc location? We discussed surfacing values.yaml in some way in the brainstorm but I think this wasn't seen as a high priority.

@andresmgot
Copy link
Contributor

Well in that case we can extract the root URL from the values.yaml and use it for any relative link in the README, isn't it?

We will still have broken links if the source repository gets modified (i.e. deleting a file) and the entry in the chartsvc is not but that would be corner cases.

@prydonius
Copy link
Contributor

Well in that case we can extract the root URL from the values.yaml and use it for any relative link in the README, isn't it?

Hmm, I'm not sure what you mean? Actually, I made a mistake in my earlier comment, chart-repo extracts values.yaml files, stores them in MongoDB and allows chartsvc to serve them https://github.com/helm/monocular/blob/master/cmd/chartsvc/handler.go#L189. We'd have to extend chart-repo to extract and store all files if we wanted chartsvc to serve any file from the chart package: https://github.com/helm/monocular/blob/master/cmd/chart-repo/utils.go#L365. Even then, we wouldn't be able to pick up relative links outside of chart directory (e.g. if the chart README in chart/kubeapps/README.md pointed to some documentation in docs/README.md).

@andresmgot
Copy link
Contributor

Hmm, I'm not sure what you mean?

Never mind, I thought that the full URL of the values.yaml file was stored somehow.

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

No branches or pull requests

3 participants