|
|
@ -200,8 +200,7 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
validInstallableChart, err := isChartInstallable(chartRequested)
|
|
|
|
if err := checkIfInstallable(chartRequested); err != nil {
|
|
|
|
if !validInstallableChart {
|
|
|
|
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -242,15 +241,15 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options
|
|
|
|
return client.Run(chartRequested, vals)
|
|
|
|
return client.Run(chartRequested, vals)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// isChartInstallable validates if a chart can be installed
|
|
|
|
// checkIfInstallable validates if a chart can be installed
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Application chart type is only installable
|
|
|
|
// Application chart type is only installable
|
|
|
|
func isChartInstallable(ch *chart.Chart) (bool, error) {
|
|
|
|
func checkIfInstallable(ch *chart.Chart) error {
|
|
|
|
switch ch.Metadata.Type {
|
|
|
|
switch ch.Metadata.Type {
|
|
|
|
case "", "application":
|
|
|
|
case "", "application":
|
|
|
|
return true, nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false, errors.Errorf("%s charts are not installable", ch.Metadata.Type)
|
|
|
|
return errors.Errorf("%s charts are not installable", ch.Metadata.Type)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Provide dynamic auto-completion for the install and template commands
|
|
|
|
// Provide dynamic auto-completion for the install and template commands
|
|
|
|