helm-git
helm-git copied to clipboard
Bug: helm-git doesn't work with packaged helm charts
When adding a helm repo from a private git repo using helm-git, the repo can only be successfully added with a ref to the charts' source directory, not the packaged charts in a directory with a helm repo index file.
helm-git version: v0.10.0
Steps To Reproduce
- Create private git repo
- Add charts to a
chartsdirectory - Package charts to a
repodirectory - Index packaged charts with
helm repo index - Add repo with
helm-git
helm repo add --username *** --password *** git+https://github.com/owner/repository@packaged-charts?ref=branch
The current behavior
$ noglob helm repo add --username $HELM_USER --password $HELM_TOKEN repo-name git+https://github.com/owner/repository@packaged-charts?ref=branch&sparse=1
[1] 58353
$ Debug in plugin 'helm-git': repo: https://github.com/owner/repository ref: branch path: packaged-charts file: index.yaml sparse: 1 depupdate: 1
Debug in plugin 'helm-git': helm_repo_uri: git+https://github.com/owner/repository@packaged-charts?ref=branch&sparse=1&depupdate=1
Error: Chart.yaml file is missing
Error: looks like "git+https://github.com/owner/repository@packaged-charts?ref=branch" is not a valid chart repository or cannot be reached: plugin "helm-git" exited with error
[1] + exit 1 noglob helm repo add --username $HELM_USER --password $HELM_TOKEN
The expected behavior
$ noglob helm repo add --username $HELM_USER --password $HELM_TOKEN repo-name git+https://github.com/owner/repository@packaged-charts?ref=branch&sparse=1
[1] 58353
$ Debug in plugin 'helm-git': repo: https://github.com/owner/repository ref: branch path: packaged-charts file: index.yaml sparse: 1 depupdate: 1
Debug in plugin 'helm-git': helm_repo_uri: git+https://github.com/owner/repository@packaged-charts?ref=branch&sparse=1&depupdate=1
"repo-name" has been added to your repositories
[1] + done noglob helm repo add --username $HELM_USER --password $HELM_TOKEN