loft-sh / vcluster

vCluster - Create fully functional virtual Kubernetes clusters - Each vcluster runs inside a namespace of the underlying k8s cluster. It's cheaper than creating separate full-blown clusters and it offers better multi-tenancy and isolation than regular namespaces.
https://www.vcluster.com
Apache License 2.0
6.93k stars 428 forks source link

Can't deploy helm chart when artefact file name is different than chart name #2105

Closed wim1988 closed 2 months ago

wim1988 commented 2 months ago

What happened?

I wanted to deploy a helm chart into my vCluster, but vCluster was logging the error: ERROR deploy/start.go:42 Error deploying manifests: couldn't find chart {"component": "vcluster"}

What did you expect to happen?

vCluster installs the specified helm chart.

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

Specify a helm release like this: ...

vCluster will download and store the chart in its working directory as strimzi-kafka-operator-helm-3-chart-0.41.0.tgz. Then it will fail with the error I mentioned. If I manually enter the vCluster pod and rename the file to strimzi-kafka-operator-0.41.0.tgz, it continues and succeeds. This is because it only works, if the downloaded artefact name equals the specified helm chart name. I checked your code and this seems to be the issue.

Anything else we need to know?

No response

Host cluster Kubernetes version

```console $ kubectl version Client Version: v1.29.0-eks-5e0fdde Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.28.10 ```

vcluster version

```console $ vcluster --version 0.20.0 (also tested with 0.20.0-beta.5 and beta.16) ```

VCluster Config

``` values: sync: toHost: pods: rewriteHosts: initContainer: image: "library/alpine:3.13.1" controlPlane: distro: k3s: enabled: true statefulSet: persistence: volumeClaim: retentionPolicy: Retain scheduling: podManagementPolicy: OrderedReady experimental: deploy: vcluster: helm: - chart: name: strimzi-kafka-operator repo: https://strimzi.io/charts version: "0.41.0" release: name: strimzi-kafka-operator namespace: operators ```