pull/19078/merge
b4nks 8 months ago committed by GitHub
commit 783f838987
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -27,6 +27,7 @@ import (
"github.com/spf13/cobra"
"helm.sh/helm/v4/pkg/action"
"helm.sh/helm/v4/pkg/chart/loader"
"helm.sh/helm/v4/pkg/chartutil"
"helm.sh/helm/v4/pkg/cli/values"
"helm.sh/helm/v4/pkg/getter"
@ -67,6 +68,24 @@ func newLintCmd(out io.Writer) *cobra.Command {
if client.WithSubcharts {
for _, p := range paths {
if strings.HasSuffix(p, ".tgz") || strings.HasSuffix(p, ".tar.gz") {
c, err := loader.Load(p)
if err != nil {
return err
}
for _, d := range c.Dependencies() {
tempDir, err := os.MkdirTemp("", "helm-lint")
if err != nil {
return errors.Wrap(err, "unable to create temp dir to extract tarball")
}
defer os.RemoveAll(tempDir)
archive, err := chartutil.Save(d, tempDir)
if err != nil {
return err
}
paths = append(paths, archive)
}
} else {
filepath.Walk(filepath.Join(p, "charts"), func(path string, info os.FileInfo, _ error) error {
if info != nil {
if info.Name() == "Chart.yaml" {
@ -79,6 +98,7 @@ func newLintCmd(out io.Writer) *cobra.Command {
})
}
}
}
client.Namespace = settings.Namespace()
vals, err := valueOpts.MergeValues(getter.All(settings))

Loading…
Cancel
Save