MCPcopy Create free account
hub / github.com/helm/helm / createV2Chart

Method createV2Chart

pkg/cmd/create.go:113–137  ·  view source on GitHub ↗
(out io.Writer)

Source from the content-addressed store, hash-verified

111}
112
113func (o *createOptions) createV2Chart(out io.Writer) error {
114 chartname := filepath.Base(o.name)
115 cfile := &chart.Metadata{
116 Name: chartname,
117 Description: "A Helm chart for Kubernetes",
118 Type: "application",
119 Version: "0.1.0",
120 AppVersion: "0.1.0",
121 APIVersion: chart.APIVersionV2,
122 }
123
124 if o.starter != "" {
125 // Create from the starter
126 lstarter := filepath.Join(o.starterDir, o.starter)
127 // If path is absolute, we don't want to prefix it with helm starters folder
128 if filepath.IsAbs(o.starter) {
129 lstarter = o.starter
130 }
131 return chartutil.CreateFrom(cfile, filepath.Dir(o.name), lstarter)
132 }
133
134 chartutil.Stderr = out
135 _, err := chartutil.Create(chartname, filepath.Dir(o.name))
136 return err
137}
138
139func (o *createOptions) createV3Chart(out io.Writer) error {
140 chartname := filepath.Base(o.name)

Callers 1

runMethod · 0.95

Calls 2

DirMethod · 0.65
CreateMethod · 0.65

Tested by

no test coverage detected