helm

package
v0.1.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StorageMap map[string]NewStorageDriver = map[string]NewStorageDriver{
	"secret":    newSecretStorageDriver,
	"configmap": newConfigMapsStorageDriver,
	"memory":    newMemoryStorageDriver,
}

StorageMap is a map from storage configuration env variables to a function that initializes that Helm storage driver.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	ActionConfig *action.Configuration
}

Agent is a Helm agent for performing helm operations

func GetAgentFromK8sAgent

func GetAgentFromK8sAgent(stg string, ns string, l *logger.Logger, k8sAgent *kubernetes.Agent) (*Agent, error)

GetAgentFromK8sAgent creates a new Agent

func GetAgentInClusterConfig

func GetAgentInClusterConfig(form *Form, l *logger.Logger) (*Agent, error)

GetAgentInClusterConfig creates a new Agent from inside the cluster using the underlying kubernetes.GetAgentInClusterConfig method

func GetAgentOutOfClusterConfig

func GetAgentOutOfClusterConfig(form *Form, l *logger.Logger) (*Agent, error)

GetAgentOutOfClusterConfig creates a new Agent from outside the cluster using the underlying kubernetes.GetAgentOutOfClusterConfig method

func GetAgentTesting

func GetAgentTesting(form *Form, storage *storage.Storage, l *logger.Logger) *Agent

GetAgentTesting creates a new Agent using an optional existing storage class

func (*Agent) GetRelease

func (a *Agent) GetRelease(
	name string,
	version int,
) (*release.Release, error)

GetRelease returns the info of a release.

func (*Agent) GetReleaseHistory

func (a *Agent) GetReleaseHistory(
	name string,
) ([]*release.Release, error)

GetReleaseHistory returns a list of charts for a specific release

func (*Agent) InstallChart

func (a *Agent) InstallChart(
	conf *InstallChartConfig,
) (*release.Release, error)

InstallChart installs a new chart

func (*Agent) InstallChartFromValuesBytes

func (a *Agent) InstallChartFromValuesBytes(
	conf *InstallChartConfig,
	values []byte,
) (*release.Release, error)

InstallChartFromValuesBytes reads the raw values and calls Agent.InstallChart

func (*Agent) ListReleases

func (a *Agent) ListReleases(
	namespace string,
	filter *ListFilter,
) ([]*release.Release, error)

ListReleases lists releases based on a ListFilter

func (*Agent) RollbackRelease

func (a *Agent) RollbackRelease(
	name string,
	version int,
) error

RollbackRelease rolls a release back to a specified revision/version

func (*Agent) UpgradeRelease

func (a *Agent) UpgradeRelease(
	name string,
	values string,
) (*release.Release, error)

UpgradeRelease upgrades a specific release with new values.yaml

func (*Agent) UpgradeReleaseByValues

func (a *Agent) UpgradeReleaseByValues(
	name string,
	values map[string]interface{},
) (*release.Release, error)

UpgradeReleaseByValues upgrades a release by unmarshaled yaml values

type Form

type Form struct {
	Cluster   *models.Cluster `form:"required"`
	Repo      *repository.Repository
	Storage   string `json:"storage" form:"oneof=secret configmap memory" default:"secret"`
	Namespace string `json:"namespace"`
}

Form represents the options for connecting to a cluster and creating a Helm agent

type InstallChartConfig

type InstallChartConfig struct {
	Chart     *chart.Chart
	Name      string
	Namespace string
	Values    map[string]interface{}
}

InstallChartConfig is the config required to install a chart

type ListFilter

type ListFilter struct {
	Namespace    string   `json:"namespace"`
	Limit        int      `json:"limit"`
	Skip         int      `json:"skip"`
	ByDate       bool     `json:"byDate"`
	StatusFilter []string `json:"statusFilter"`
}

ListFilter is a struct that represents the various filter options used for retrieving the releases

type NewStorageDriver

type NewStorageDriver func(
	l *logger.Logger,
	v1Interface corev1.CoreV1Interface,
	namespace string,
) *storage.Storage

NewStorageDriver is a function type for returning a new storage driver

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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