kubernetes-sigs / kustomize

Customization of kubernetes YAML configurations
Apache License 2.0
10.93k stars 2.24k forks source link

Unable to Fetch Helm Chart from Self-hosted ChartMuseum Registry #5686

Closed Piwero closed 16 hours ago

Piwero commented 5 months ago

What happened?

When attempting to use a Helm chart from a self-hosted ChartMuseum registry with basic authentication through kustomize, the following error occurs:

Error: Error: looks like "https://mychartmuseumrepo.com" is not a valid chart repository or cannot be reached: failed to fetch https://mychartmuseumrepo.com/index.yaml : 401 Unauthorized
: unable to run: 'helm pull --untar --untardir apps/base/chartmuseum/charts/mywantedchart-0.0.1 --repo https://mychartmuseumrepo.com/ mywantedchart --version 0.0.1' with env=[HELM_CONFIG_HOME=/var/folders/xxxx/helm HELM_CACHE_HOME=/var/folders/f8/xxxx/helm/.cache HELM_DATA_HOME=/var/folders/f8/xxx/helm/.data] (is 'helm' installed?): exit status 1

What did you expect to happen?

I expected kustomize to successfully fetch the Helm chart from the self-hosted ChartMuseum registry using the provided basic authentication credentials.

How can we reproduce it (as minimally and precisely as possible)?

To reproduce the issue:

  1. Set up a self-hosted ChartMuseum registry requiring basic authentication and push mywantedchart to it

  2. Add the ChartMuseum repository to Helm using the command: helm repo add mychartmuseumrepo https://mychartmuseumrepo.com -u myuser -p mypassword.

  3. Create a kustomization.yaml file with the following content:

    helmCharts:
    - name: mywantedchart
    repo: https://mychartmuseumrepo.com
    releaseName: chartmusesum
    version: 0.0.1
    valuesFile: values.yaml 
  4. Run kustomize build . --enable-helm.

Expected output

Kustomize should successfully fetch the Helm chart from the specified repository using the provided authentication credentials.

Actual output

Kustomize fails to fetch the Helm chart from the repository and returns a 401 Unauthorized error.

Error: Error: looks like "https://mychartmuseumrepo.com" is not a valid chart repository or cannot be reached: failed to fetch https://mychartmuseumrepo.com/index.yaml : 401 Unauthorized
: unable to run: 'helm pull --untar --untardir apps/base/chartmuseum/charts/mywantedchart-0.0.1 --repo https://mychartmuseumrepo.com/ mywantedchart --version 0.0.1' with env=[HELM_CONFIG_HOME=/var/folders/xxxx/helm HELM_CACHE_HOME=/var/folders/f8/xxxx/helm/.cache HELM_DATA_HOME=/var/folders/f8/xxx/helm/.data] (is 'helm' installed?): exit status 1

Kustomize version

v5.4.1

Operating system

MacOS

k8s-ci-robot commented 5 months ago

This issue is currently awaiting triage.

SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
k8s-triage-robot commented 2 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 16 hours ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 16 hours ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes-sigs/kustomize/issues/5686#issuecomment-2380554236): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.