Skip to content
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

Helm V3 unable to use a remote chart absolute URL with dashed chart name #1587

Closed
Tracked by #2847
ctison opened this issue May 25, 2021 · 2 comments
Closed
Tracked by #2847
Assignees
Labels
area/helm kind/bug Some behavior is incorrect or out of spec mro2 Monica's list of 2st tier overlay related issues resolution/fixed This issue was fixed

Comments

@ctison
Copy link

ctison commented May 25, 2021

I need to deploy fission, which is provided as a tgz from Github releases.
I saw that PR for Helm V2 but when I tried with Helm V3, the following error occurred:

Error: invocation of kubernetes:helm:template returned an error: failed to generate YAML for specified Helm chart: failed to load chart from temp directory: stat /var/folders/3y/2vy52_5n0zb92zyrh8p42zmr0000gn/T/helm420775922/fission: no such file or directory

The resource:

new k8s.helm.v3.Chart('fission', {
  chart: 'https://github.com/fission/fission/releases/download/1.12.0/fission-core-1.12.0.tgz',
  values: {
    routerServiceType: 'ClusterIP',
  },
});
@ctison ctison added the kind/enhancement Improvements or new features label May 25, 2021
@lukehoban lukehoban added kind/bug Some behavior is incorrect or out of spec and removed kind/enhancement Improvements or new features labels May 28, 2021
@mnlumi mnlumi added the mro2 Monica's list of 2st tier overlay related issues label Mar 28, 2023
@EronWright
Copy link
Contributor

The issue here is that Pulumi is checking for a folder in the unpacked tar named fission rather than fission-core.
Seems due to a too-restrictive regex:

chartName, err := func() (string, error) {
if registry.IsOCI(c.opts.Chart) {
u, err := url.Parse(c.opts.Chart)
if err != nil {
return "", err
}
return filepath.Base(u.Path), nil
}
// Check if the chart value is a URL with a defined scheme.
if _url, err := url.Parse(c.opts.Chart); err == nil && len(_url.Scheme) > 0 {
// Chart path will be of the form `/name-version.tgz`
re := regexp.MustCompile(`/(\w+)-(\S+)\.tgz$`)
matches := re.FindStringSubmatch(_url.Path)
if len(matches) > 1 {
return matches[1], nil
}
}
splits := strings.Split(c.opts.Chart, "/")
if len(splits) == 2 {
return splits[1], nil
}
return c.opts.Chart, nil
}()

@EronWright EronWright changed the title Helm V3 remote chart absolute URL Helm V3 unable to use a remote chart absolute URL with dashed chart name Apr 1, 2024
@EronWright EronWright self-assigned this May 14, 2024
@EronWright EronWright added the resolution/fixed This issue was fixed label May 14, 2024
@EronWright
Copy link
Contributor

I've confirmed that the issue is fixed in the upcoming Chart v4. This works as expected:

import * as k8s from "@pulumi/kubernetes";

new k8s.helm.v4.Chart('fission', {
    chart: 'https://github.com/fission/fission/releases/download/1.12.0/fission-core-1.12.0.tgz',
    values: {
      routerServiceType: 'ClusterIP',
    },
  });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm kind/bug Some behavior is incorrect or out of spec mro2 Monica's list of 2st tier overlay related issues resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

5 participants