MCPcopy
hub / github.com/helm/helm / runInstall

Function runInstall

pkg/cmd/install.go:254–353  ·  view source on GitHub ↗
(args []string, client *action.Install, valueOpts *values.Options, out io.Writer)

Source from the content-addressed store, hash-verified

252}
253
254func runInstall(args []string, client *action.Install, valueOpts *values.Options, out io.Writer) (*release.Release, error) {
255 slog.Debug("Original chart version", "version", client.Version)
256 if client.Version == "" && client.Devel {
257 slog.Debug("setting version to >0.0.0-0")
258 client.Version = ">0.0.0-0"
259 }
260
261 name, chartRef, err := client.NameAndChart(args)
262 if err != nil {
263 return nil, err
264 }
265 client.ReleaseName = name
266
267 cp, err := client.LocateChart(chartRef, settings)
268 if err != nil {
269 return nil, err
270 }
271
272 slog.Debug("Chart path", "path", cp)
273
274 p := getter.All(settings)
275 vals, err := valueOpts.MergeValues(p)
276 if err != nil {
277 return nil, err
278 }
279
280 // Check chart dependencies to make sure all are present in /charts
281 chartRequested, err := loader.Load(cp)
282 if err != nil {
283 return nil, err
284 }
285
286 ac, err := chart.NewAccessor(chartRequested)
287 if err != nil {
288 return nil, err
289 }
290
291 if err := checkIfInstallable(ac); err != nil {
292 return nil, err
293 }
294
295 if ac.Deprecated() {
296 slog.Warn("this chart is deprecated")
297 }
298
299 if req := ac.MetaDependencies(); len(req) > 0 {
300 // If CheckDependencies returns an error, we have unfulfilled dependencies.
301 // As of Helm 2.4.0, this is treated as a stopping condition:
302 // https://github.com/helm/helm/issues/2209
303 if err := action.CheckDependencies(chartRequested, req); err != nil {
304 if client.DependencyUpdate {
305 man := &downloader.Manager{
306 Out: out,
307 ChartPath: cp,
308 Keyring: client.Keyring,
309 SkipUpdate: false,
310 Getters: p,
311 RepositoryConfig: settings.RepositoryConfig,

Callers 3

newInstallCmdFunction · 0.85
newUpgradeCmdFunction · 0.85
newTemplateCmdFunction · 0.85

Calls 14

DeprecatedMethod · 0.95
MetaDependenciesMethod · 0.95
UpdateMethod · 0.95
AllFunction · 0.92
LoadFunction · 0.92
CheckDependenciesFunction · 0.92
checkIfInstallableFunction · 0.85
NameAndChartMethod · 0.80
LocateChartMethod · 0.80
MergeValuesMethod · 0.80
GetRegistryClientMethod · 0.80
releaserToV1ReleaseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…