Reading a file outside the Helm package via Files.Get
Hi there,
There are some other issues in the Grafana Helm chat due to the way they load a local file, I shared my findings in the issue (here).
In the Helm documentation Accessing Files Inside Templates, it says Some files cannot be accessed through the .Files object, usually for security reasons and I wasn't sure if this also covers the case of Grafana.
Basically, they have the template to read a file and then you can pass a local file for it to read/load.
This works fine when I have all the files locally, but it doesn't read/load the file when I do helm package grafana/ or try to use it from their official repo grafana/grafana. As far as I could see, it only works with local files, like:
helm upgrade \
--atomic \
--timeout 2m \
--cleanup-on-fail \
--install grafana \
-f values.yaml \
./
But not from a repo/package, like
helm upgrade \
--atomic \
--timeout 2m \
--cleanup-on-fail \
--install grafana \
-f values.yaml \
grafana/grafana ## or ./grafana-7.3.7.tgz
Is it an expected behaviour/did I miss something in the docs or ...?
Thanks,
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
According to the latest information in the documentation about this issue:
- Charts must contain files that will be added by
.Files.Get. - A chart may access files of child subcharts via
.Files.Get. - Files within
templates/are inaccessible. - File paths written inside
.helmignoreare inaccessible. - Subchart file paths written inside
.helmignoreare inaccessible for the parent chart. - Files within the parent chart directory are inaccessible.
- Files somewhere else are inaccessible.
Tested with Helm 4.0.0.