helm-git icon indicating copy to clipboard operation
helm-git copied to clipboard

Helm dependency update against requirements.yaml referencing helm-git repo by name fails.

Open bitsofinfo opened this issue 5 years ago • 4 comments

bash-4.4$ helm repo list
NAME                    URL
stable                  https://kubernetes-charts.storage.googleapis.com
local                   http://127.0.0.1:8879/charts
jetstack                https://charts.jetstack.io
bitsofinfo-appdeploy    git+https://github.com/bitsofinfo/appdeploy@

In another charts requirements.yaml

# requirements.yaml
dependencies:
- name: appdeploy
  version: "1.0.1"
  repository: "bitsofinfo-appdeploy"
bash-4.4$ helm dependency update
Error: no repository definition for bitsofinfo-appdeploy. Please add them via 'helm repo add'
Note that repositories must be URLs or aliases. For example, to refer to the stable
repository, use "https://kubernetes-charts.storage.googleapis.com/" or "@stable" instead of
"stable". Don't forget to add the repo, too ('helm repo add').

bitsofinfo avatar Jun 10 '19 17:06 bitsofinfo

bash-4.4$ helm repo add appdeploy-1.0.1 git+https://github.com/bitsofinfo/appdeploy@?ref=1.0.1
fatal: update_ref failed for ref 'HEAD': cannot update ref 'refs/heads/master': trying to write non-commit object 95f7b58c955075f3e3ff335a50e39c8cf56924be to bran
ch 'refs/heads/master'
Error in plugin 'helm-git': error Unable to sparse-checkout. Check your Git ref (1.0.1) and path ().
Error: Looks like "git+https://github.com/bitsofinfo/appdeploy@?ref=1.0.1" is not a valid chart repository or cannot be reached: plugin "helm-git" exited with error

bitsofinfo avatar Jun 10 '19 17:06 bitsofinfo

#9

bitsofinfo avatar Jun 10 '19 17:06 bitsofinfo

you can do like this:

dependencies: 
- name: zookeeper
  repository: "file://../zookeeper"
  version: 0.0.1

then execute this command:

helm dep update

fxl0206 avatar Jul 15 '20 12:07 fxl0206

This should now be fixed with https://github.com/aslafy-z/helm-git/releases/tag/v0.11.2. Can you have a try? Edit: It's in fact fixed by v0.11.3 (#215) Closing this issue.

aslafy-z avatar Jun 07 '22 11:06 aslafy-z