aslafy-z / helm-git

Helm Plugin - Install Helm Charts strait from Git repositories
Apache License 2.0
292 stars 46 forks source link

Bug: doesn't seem to support gitlab #281

Open jamesla opened 3 months ago

jamesla commented 3 months ago

Given the following helm chart repo

https://gitlab.com/one-touch-pipeline/weskit/helm-deployment

It's not possible to add as a subchart IE to reproduce

dependencies:
  - name: weskit
    version: "0.1.0"
    repository: "git+https://gitlab.com/one-touch-pipeline/weskit/helm-deployment"

and running helm dependency update

It asks for a username

Assuming this is because of gitlab projects making the URI have 3 sections.

Here is the public repo https://gitlab.com/one-touch-pipeline/weskit/helm-deployment

Is gitlab supported?

aslafy-z commented 2 months ago

Hello @jamesla ,

Please try again with:

helm-git version < 1.0.0:

dependencies:
  - name: weskit
    version: "0.2.0"
    repository: "git+https://gitlab.com/one-touch-pipeline/weskit/helm-deployment@?ref=main"

helm-git version >= 1.2.0:

dependencies:
  - name: weskit
    version: "0.2.0"
    repository: "git+https://gitlab.com/one-touch-pipeline/weskit/helm-deployment"

Note that I highly recommend pinning Git hash or at least tags with the ref option.

Let me know if it works for you so I can close this issue.

Regards

aslafy-z commented 1 month ago

@jamesla Please reopen the issue if needed.

jamesla commented 1 month ago

Thanks @aslafy-z sorry I didn't see your reply.

So I've tried your suggestion with the updated version of helm-git but it's asking me for github credentials - however this is an open source repository.

You can see it's open source here: https://gitlab.com/one-touch-pipeline/weskit/helm-deployment

dependencies:
  - name: weskit
    version: "0.2.0"
    repository: "git+https://gitlab.com/one-touch-pipeline/weskit/helm-deployment@?ref=main"

Why is it asking for credentials?

jamesla commented 1 month ago

@aslafy-z also it looks like reopening issues is disabled as the button is not appearing

image

aslafy-z commented 1 month ago

I could not reproduce your issue. Here's the steps I used:

curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
helm plugin install https://github.com/aslafy-z/helm-git --version 1.3.0
helm create mychart
cd mychart
cat <<EOF >> Chart.yaml
dependencies:
  - name: weskit
    version: "0.2.0"
    repository: "git+https://gitlab.com/one-touch-pipeline/weskit/helm-deployment@?ref=main"
EOF
helm dependency build
helm template .

The dependency build is a bit slow, there might be some enhancements to do in this regard.

I would recommend you to check your Helm managed repos (helm repo list) and delete any non relevant ones. They may be refreshed by Helm while working on this Helm build.