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

[proposal] support file schema in pull command #7584

Closed
lucendio opened this issue Feb 13, 2020 · 7 comments
Closed

[proposal] support file schema in pull command #7584

lucendio opened this issue Feb 13, 2020 · 7 comments
Labels

Comments

@lucendio
Copy link

As of now (v3.0.2) it's only possible to pull "remote" charts (and the whole dependency tree). This issue proposes to also support pulling in local charts by providing a path in the local FS - if necessary, prepended by file:// like it's done in chart requirements.yaml files.

Current and possible interface behaviour

directly:

$  helm pull file://path/to/mychart
> Error: scheme "file" not supported

or with a detour through a local repository:

$  helm repo add local file://path/to/my/charts
> Error: could not find protocol handler for: file

$  helm pull local/mychart

As an alternative, when working with the subcommand dependency (e.g. by adding a --pull flag):

$ cat ./Chart.yaml
dependencies:
- name: mychart-requiring-3rd-party-subcharts
  version: "0.0.1"
  repository: "file://path/to/mychart"

$  helm dependency build ./Chart.yaml
> Error: only unpacked charts can be updated 

I'm looking forward to you thoughts.

@technosophos
Copy link
Member

file:// is already supported in the repository field. It is not supported for repository protocols (e.g. for network operations), but could be via a protocol plugin.

If you wanted to add this to Helm core, you'd have to give a clear use case for why this would be a desirable feature. We deprecated the helm serve command in Helm 2 because nobody used it, and removed it in Helm 3. This would come close to adding that back... but it hasn't been a feature I've seen a strong use case for. After all, the files are already right there on the file system. Why push/pull them?

@senax
Copy link

senax commented Jul 27, 2020

Hi,

I ran into this same issue when using 'helmfile'. There is a requirement to install charts from a local directory but it doesn't allow me to specify a tgz file as chart:.

Thank you for the pointer on plugins; it turns out it is trivial to write a basic file:// download plugin.

Here is a ~10 line example that works for me: https://github.com/senax/helm_file_repo

@sguidos
Copy link

sguidos commented Jul 28, 2020

@technosophos , one use case for adding a local folder as a repository is that I could use the exact same installation script both locally on my (Windows) development machine and then also when I test on a remote (Linux) server. Currently, my (Helm v2) local script needs to include the drive letter and path to the chart, the chart file extension (.tgz) and (worst of all) the exact version number of the chart, e.g:
helm install --name mychart C:\RepositoryFolder\mychart-2.1.7.tgz

While the script I run on the remote server simply uses the repository and chart names, and will get the 'latest' version by default:
helm install --name mychart myrepo/mychart

Perhaps I am missing something here?

@bridgetkromhout
Copy link
Member

Hi, @lucendio & @sguidos - as @senax points out above, it is possible to serve these needs with a plugin. As stated above, we would need to see a clear justification to add this functionality back into Helm core. If any of you (or anyone else reading this) would like to write up that proposal, our process is documented here: https://github.com/helm/community/blob/master/hips/hip-0001.md - that would allow you to explain why this should be in Helm core. I will close this issue at this time, but look forward to any proposal you may choose to make. Thanks.

@zoobab
Copy link

zoobab commented Oct 13, 2022

"why this should be in Helm core"

I need to be able to use Helm in a corporate environment which is not connected to the Internet, and where I don't have the ability to run a local webserver.

Ideally I should be able to use Helm by just shipping a git repository with everything stored in there (including TGZs).

@keskad
Copy link

keskad commented Oct 27, 2022

That's my use case. I'm using ArgoCD to deploy massively those kustomization.yaml files to allow teams to decide by themselves what they deploy. That approach would allow them to deploy a custom helm chart from their repository without publishing it to artifactory.

---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
helmCharts:
    - name: something
      valuesFile: some-config.yaml
      version: "1.5"
      repo: ../charts/some-chart

@zoobab
Copy link

zoobab commented Oct 27, 2022

By the way, i had to fix the file plugin here:

https://github.com/zoobab/helm_file_repo

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

No branches or pull requests

8 participants