| 111 | } |
| 112 | |
| 113 | func (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 | |
| 139 | func (o *createOptions) createV3Chart(out io.Writer) error { |
| 140 | chartname := filepath.Base(o.name) |