New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helm3 Fetch Bug when multiple directories extracted #1046
Comments
Just ran into this issue with the new rancher version. |
@mikhailshilkov This issue appears to be specific to the .NET implementation. I confirmed that the following works: new k8s.helm.v3.Chart(
"rancher",
{
repo: "rancher-latest",
version: "2.4.0",
chart: "rancher",
},
); |
The issue occurs when the fetch options repo are provided. It also depends on the ordering of the directoris in the temp dir which it could give you the correct directory. The nodejs sdk also expects a single dir at index 0 which is no true if the repo fetch option is set. https://github.com/pulumi/pulumi-kubernetes/blob/master/sdk/nodejs/helm/v2/helm.ts#L172 new k8s.helm.v3.Chart(
"rancher",
{
version: "2.4.0",
chart: "rancher",
fetchOpts: {
repo: "https://releases.rancher.com/server-charts/latest"
}
},
); The work around is to add the helm repo before hand instead of directly specifying it in the fetch options. This is without the repo fetch option set and it extracts a single directory |
I can confirm the same behavior for python! It seems when specifying the "--repo" fetch option it will extract two folders, one empty and one with the chart, as already described previously by @mitchellmaler. Python example:
Compare the directorties of:
and
I can also confirm the workaround of @mitchellmaler is working by adding
In the python code of pulumi-kubernetes it also takes the first directory it can find |
This should be fixed by #1064 This change isn't yet part of a tagged release, but you can use a dev release to test it out now. |
Problem description
Currently the .NET helm extraction/fetch logic expects the directory to contain only a single directory after extraction. You can see that here: https://github.com/pulumi/pulumi-kubernetes/blob/master/sdk/dotnet/Helm/ChartBase.cs#L68
The issue is the chart I am pulling down when untared actually extracts to two directories. One holding the contents and another completely empty. Due to that expectation of the directory being the first in the list it breaks the resource render due to the first dir being empty.
The helm chart I am having issues with is the BigIP F5 Ctrl chart.
You can run the exec command below to view it extracts two directories and not a single one.
helm fetch "f5-bigip-ctlr" --untar --version "0.0.7" --repo "https://f5networks.github.io/charts/stable"
Errors & Logs
Affected product version(s)
v1.6.0
Reproducing the issue
Suggestions for a fix
Update the logic to figure out what directory holds the chart.yaml and/or chart files.
https://github.com/pulumi/pulumi-kubernetes/blob/master/sdk/dotnet/Helm/ChartBase.cs#L68
The text was updated successfully, but these errors were encountered: