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 Chart localPath not resolving properly when used with Composable Packages #1153

Closed
tworcester opened this issue Jan 2, 2023 · 0 comments · Fixed by #1154
Closed

Helm Chart localPath not resolving properly when used with Composable Packages #1153

tworcester opened this issue Jan 2, 2023 · 0 comments · Fixed by #1154

Comments

@tworcester
Copy link
Contributor

Environment

Device and OS: Rocky 8
App version: v0.23.1
Kubernetes distro being used: k3s (zarf install)
Other:

Steps to reproduce

Using the zarf composable-packages example try to create this package:

kind: ZarfPackageConfig
metadata:
  name: compose-example
  description: "Demo Zarf package composability"

components:
  - name: games
    required: true
    description: "Example of a composed package with a unique description for this component"
    import:
      path: ../game
      # Example optional custom name to point to in the imported package
      name: baseline
  - name: local-chart
    required: false
    import:
      path: ../helm-local-chart
      name: demo-helm-local-chart

Expected result

Bundled greatness

Actual Result

  DEBUG   2023-01-02T09:42:08-05:00  -  packager.createComponentPaths({
            "name": "local-chart",
            "only": {
              "cluster": {}
            },
            "import": {
              "path": ""
            },
            "scripts": {},
            "charts": [
              {
                "name": "local-demo",
                "version": "0.1.0",
                "namespace": "local-chart",
                "localPath": "chart"
              }
            ],
            "images": [
              "nginx:1.16.0"
            ]
          })
  ⠋  Processing helm chart local-demo:0.1.0 from chart (0s)  DEBUG   2023-01-02T09:42:08-05:00  -  Chart.yaml file is missing                                                                               
     ERROR:  Validation failed for chart from chart (Chart.yaml file is missing)
  DEBUG   2023-01-02T09:42:08-05:00  -  goroutine 1 [running]:
          runtime/debug.Stack()
                /opt/hostedtoolcache/go/1.19.4/x64/src/runtime/debug/stack.go:24 +0x65
          github.com/defenseunicorns/zarf/src/pkg/message.Fatalf({0x301c220?, 0xc00044f608?}, {0x34ffef6, 0x28}, {0xc0014bdf28, 0x2, 0x2})
                /home/runner/work/zarf/zarf/src/pkg/message/message.go:149 +0x1df
          github.com/defenseunicorns/zarf/src/pkg/message.(*Spinner).Fatalf(0x34bebe5?, {0x4330f60?, 0xc00044f608?}, {0x34ffef6?, 0x28?}, {0xc0014bdf28?, 0x2?, 0x2?})
                /home/runner/work/zarf/zarf/src/pkg/message/spinner.go:120 +0xe5
          github.com/defenseunicorns/zarf/src/internal/packager/helm.(*Helm).CreateChartFromLocalFiles(0xc0014beac8, {0xc000a1ed80, 0x32})
                /home/runner/work/zarf/zarf/src/internal/packager/helm/repo.go:30 +0x247
          github.com/defenseunicorns/zarf/src/pkg/packager.(*Packager).addComponent(_, {{0xc000d04160, 0xb}, {0x0, 0x0}, 0x0, 0x0, {{0x0, 0x0}, {{0x0, ...}, ...}}, ...})
                /home/runner/work/zarf/zarf/src/pkg/packager/create.go:260 +0x553
          github.com/defenseunicorns/zarf/src/pkg/packager.(*Packager).Create(0xc000a8eab0, {0x0?, 0x0?})
                /home/runner/work/zarf/zarf/src/pkg/packager/create.go:100 +0x1398
          github.com/defenseunicorns/zarf/src/cmd.glob..func11(0x6081a00?, {0xc000b541c0?, 0x2?, 0x2?})
                /home/runner/work/zarf/zarf/src/cmd/package.go:65 +0x185
          github.com/spf13/cobra.(*Command).execute(0x6081a00, {0xc000b541a0, 0x2, 0x2})
                /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:920 +0x847
          github.com/spf13/cobra.(*Command).ExecuteC(0x6082e20)
                /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044 +0x3bd
          github.com/spf13/cobra.(*Command).Execute(...)
                /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:968
          github.com/defenseunicorns/zarf/src/cmd.Execute()
                /home/runner/work/zarf/zarf/src/cmd/root.go:63 +0x25
          main.main()
                /home/runner/work/zarf/zarf/main.go:23 +0x6f

Visual Proof (screenshots, videos, text, etc)

See logs above.

Severity/Priority

Workaround is to update the sub-component with an absolute path to the chart folder.

Additional Context

N/A

@github-project-automation github-project-automation bot moved this to New Requests in Zarf Project Board Jan 2, 2023
@jeff-mccoy jeff-mccoy added this to the v0.24.0 milestone Jan 4, 2023
@RothAndrew RothAndrew modified the milestones: v0.24.0, Docs Examples Jan 6, 2023
jeff-mccoy added a commit that referenced this issue Feb 1, 2023
## Description

<!-- Please include a summary of the change. Any relevant motivation or
context is also helpful, as well as any dependencies that are required
for this change -->

## Related Issue

<!--- This project prefers to accept pull requests related to open
issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->

Fixes #1153

## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)

---------

Co-authored-by: Megamind <[email protected]>
Co-authored-by: Jonathan Perry <[email protected]>
@github-project-automation github-project-automation bot moved this from New Requests to Done in Zarf Project Board Feb 1, 2023
Noxsios pushed a commit that referenced this issue Mar 8, 2023
## Description

<!-- Please include a summary of the change. Any relevant motivation or
context is also helpful, as well as any dependencies that are required
for this change -->

## Related Issue

<!--- This project prefers to accept pull requests related to open
issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->

Fixes #1153

## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)

---------

Co-authored-by: Megamind <[email protected]>
Co-authored-by: Jonathan Perry <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants