Rancher just released the new version 2.4.0 but I ...
# kubernetes
f
Rancher just released the new version 2.4.0 but I am unable to upgrade to it due to the helm fecth extracting two directories. Seems like the logic to get the templates/values expects the untar to only have a single directory extracted and not two. I logged an issue earlier here https://github.com/pulumi/pulumi-kubernetes/issues/1046 but now I cannot upgrade rancher which is something we need to start testing. I am using dotnet but I am guessing the other sdks also have the same issue.
g
Are you running
helm fetch
directly, or letting the Chart class do that for you?
f
I am letting the class do it. I just tested the fetch command myself and am able to recreate the issue by seeing it extra two directories.
The code is setup to expect a single extracted directory which doesn't work if more than one is exacted. Due to file ordering it picks the wrong directory which doesn't hold the chart contents.
g
Got it; thanks. Looks like this issue is specific to the .NET provider. I’ve updated the issue with that info
Copy code
new k8s.helm.v3.Chart(
    "rancher",
    {
        repo: "rancher-latest",
        version: "2.4.0",
        chart: "rancher",
    },
);
worked for me with the NodeJS SDK
f
Yea @tall-librarian-49374 wasn't sure if it was just .net specific since the code was ported over from the node sdk.
Looking at the nodejs code it also expects a single directory based on the index 0 https://github.com/pulumi/pulumi-kubernetes/blob/master/sdk/nodejs/helm/v2/helm.ts#L172
So if you checked out the temp dir it may just be different ordering which makes it work unless yours isn't extracting two directories.
So figured it out. When you provide the fetchOps and repo url directly it extracts it into two directories.
Copy code
new k8s.helm.v3.Chart(
  "rancher",
  {
      version: "2.4.0",
      chart: "rancher",
      fetchOpts: {
        repo:  "<https://releases.rancher.com/server-charts/latest>"
      }
  },
);
so the work around is to add the helm repo before hand
g
Aha, thanks for tracking that down.
f
Anytime! I updated the issue.
Hey @gorgeous-egg-16927 is there a way to add the helm repo using pulumi or is that going to be a manual step before hand?
g
It’s not built in currently. You could either handle it out of band (e.g., in CI), or could also shell out from your pulumi program
f
Okay thought so! ill figure something out