Skip to content

Commit

Permalink
replace helm cli command with go client
Browse files Browse the repository at this point in the history
  • Loading branch information
zreigz committed Sep 14, 2023
1 parent cf6e22c commit b4e893a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pkg/scaffold/creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/pluralsh/plural/pkg/api"
"github.com/pluralsh/plural/pkg/utils"
"github.com/pluralsh/plural/pkg/utils/pathing"
"helm.sh/helm/v3/pkg/chartutil"
)

var categories = []string{
Expand Down Expand Up @@ -77,7 +78,7 @@ func ApplicationScaffold(client api.Client) error {
return err
}

if err := utils.Exec("helm", "create", app); err != nil {
if err := createHelm(app); err != nil {
return err
}

Expand All @@ -93,3 +94,12 @@ func ApplicationScaffold(client api.Client) error {

return nil
}

func createHelm(name string) error {
chartname := filepath.Base(name)
_, err := chartutil.Create(chartname, filepath.Dir(name))
if err != nil {
return err
}
return nil
}

0 comments on commit b4e893a

Please sign in to comment.