install

package
v0.0.0-...-c6cf6ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Failed      string = "failed"
	Progressing string = "progressing"
	Uninstalled string = "uninstalled"
	Deployed    string = "deployed"
	Unknown     string = "unknown"
)

Variables

View Source
var (
	// ErrReleaseNotFound duplicates the helm error from the driver package
	ErrReleaseNotFound = errors.New("release: not found")
)
View Source
var GetHelm = func(name string, getter genericclioptions.RESTClientGetter, log logr.Logger) Installer {
	return &HelmInstaller{
		prefix:       name,
		namespace:    catalog.SystemNamespace,
		ClientGetter: getter,
		Log:          log,
	}
}

GetHelm matches type controller.InstallerGetter, returns a HelmInstaller

Functions

This section is empty.

Types

type HelmInstaller

type HelmInstaller struct {
	ClientGetter genericclioptions.RESTClientGetter
	Log          logr.Logger
	// contains filtered or unexported fields
}

func (*HelmInstaller) Delete

func (i *HelmInstaller) Delete(chartName string, repository string, version string, values string) error

func (*HelmInstaller) Get

func (i *HelmInstaller) Get(name string) (*Installation, error)

func (*HelmInstaller) GetNamespace

func (i *HelmInstaller) GetNamespace() string

func (*HelmInstaller) GetReleaseName

func (i *HelmInstaller) GetReleaseName(name string) string

func (*HelmInstaller) Install

func (i *HelmInstaller) Install(chartName string, repository string, version string, values string) error

func (*HelmInstaller) IsUpgrade

func (i *HelmInstaller) IsUpgrade(comp *v1alpha1.WaveComponent, inst *Installation) bool

func (*HelmInstaller) SetNamespace

func (i *HelmInstaller) SetNamespace(namespace string)

func (*HelmInstaller) Upgrade

func (i *HelmInstaller) Upgrade(chartName string, repository string, version string, values string) error

type InstallSpec

type InstallSpec struct {
	Name       string                      `json:"name"`
	Repository string                      `json:"repository"`
	Version    string                      `json:"version,omitempty"`
	Values     string                      `json:"values,omitempty"`
	Enabled    map[v1alpha1.ChartName]bool `json:"enabled,omitempty"`
}

type Installation

type Installation struct {
	Name        string
	Version     string
	Values      map[string]interface{}
	Status      string
	Description string
	AppVersion  string
}

Installation represents a helm release, that is, a chart installed into a cluster

type Installer

type Installer interface {

	// Namespace where components are installed, the namespace must exist before Install() is called
	GetNamespace() string

	// Set the namespace where components are installed
	SetNamespace(namespace string)

	// returns the release name for a given chart
	GetReleaseName(chartName string) string

	// Install applies a helm chart to a cluster.  It's a lightweight wrapper around the helm 3 code
	Install(name string, repository string, version string, values string) error

	// Get a details of an installation
	Get(name string) (*Installation, error)

	// Upgrade applies a helm chart to a cluster.  It's a lightweight wrapper around the helm 3 code
	Upgrade(name string, repository string, version string, values string) error

	IsUpgrade(comp *v1alpha1.WaveComponent, i *Installation) bool

	// Delete removes a helm release from a cluster.  It's a lightweight wrapper around the helm 3 code
	Delete(name string, repository string, version string, values string) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL