// Install installs a Helm chart and returns release information. Code ported
// from: https://github.com/helm/helm/blob/v3.4.2/cmd/helm/install.go
Install installs a Helm chart and returns release information.
// Install installs a Helm chart and returns release information . Code ported // from : https : // github . com / helm / helm / blob / v3 . 4 . 2 / cmd / helm / install . go
func Install(params InstallParameters) (storage.Release, error) {
	settings := cli.New()
	actionConfig, err := helmInit(settings, params.Namespace)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	client := action.NewInstall(actionConfig)
	client.Timeout = helmTimeout
	client.Namespace = params.Namespace
	client.ReleaseName = params.Release
	if client.ReleaseName == "" {
		client.GenerateName = true
	}
	valueOpts := &values.Options{
		ValueFiles: params.Values,
		Values:     params.Set,
	}
	result, err := runInstall(settings, client, params.Path, valueOpts)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	rel, err := storage.NewRelease(result)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	return rel, nil
}
func Install ( params InstallParameters ) ( storage . Release , error ) { settings := cli . New ( ) actionConfig , err := helmInit ( settings , params . Namespace ) if err != nil { return nil , trace . Wrap ( err ) } client := action . NewInstall ( actionConfig ) client . Timeout = helmTimeout client . Namespace = params . Namespace client . ReleaseName = params . Release if client . ReleaseName == " " { client . GenerateName = true } valueOpts := & values . Options { ValueFiles : params . Values , Values : params . Set , } result , err := runInstall ( settings , client , params . Path , valueOpts ) if err != nil { return nil , trace . Wrap ( err ) } rel , err := storage . NewRelease ( result ) if err != nil { return nil , trace . Wrap ( err ) } return rel , nil }
Install installs a Helm chart and returns release information.
Install installs a Helm chart and returns release information .
// Helm 3 requires that either a name is provided or the --generate-name flag is set to true. // https://helm.sh/docs/faq/#name-or---generate-name-is-now-required-on-install