helm

package
v1.0.0-beta.6 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: Apache-2.0 Imports: 18 Imported by: 2 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const HelmPath = "helm"
View Source
const TillerPath = "tiller"
View Source
const TillerWaitRetryDelay = 250 * time.Millisecond
View Source
const TillerWaitTimeout = 10 * time.Second // Should not be less than TillerWaitTimeoutSeconds + TillerWaitRetryDelay
View Source
const TillerWaitTimeoutSeconds = 2

Variables

View Source
var NewClient = func(logLabels ...map[string]string) HelmClient {
	logEntry := log.WithField("operator.component", "helm")
	if len(logLabels) > 0 {
		logEntry = logEntry.WithFields(utils.LabelsToLogFields(logLabels[0]))
	}

	return &helmClient{
		LogEntry:   logEntry,
		KubeClient: clientFactoryInstance().KubeClient,
	}
}

Functions

func InitTillerProcess

func InitTillerProcess(options TillerOptions) error

InitTillerProcess starts tiller as a subprocess. If tiller is exited, addon-operator also exits.

func TillerHealthHandler

func TillerHealthHandler(tillerProbeAddress string, tillerProbePort int32) func(writer http.ResponseWriter, request *http.Request)

TillerHealthHandler translates tiller's /liveness response

func WithKubeClient

func WithKubeClient(client kube.KubernetesClient)

Types

type HelmClient

type HelmClient interface {
	TillerNamespace() string
	CommandEnv() []string
	Cmd(args ...string) (string, string, error)
	InitAndVersion() error
	DeleteSingleFailedRevision(releaseName string) error
	DeleteOldFailedRevisions(releaseName string) error
	LastReleaseStatus(releaseName string) (string, string, error)
	UpgradeRelease(releaseName string, chart string, valuesPaths []string, setValues []string, namespace string) error
	Render(releaseName string, chart string, valuesPaths []string, setValues []string, namespace string) (string, error)
	GetReleaseValues(releaseName string) (utils.Values, error)
	DeleteRelease(releaseName string) error
	ListReleases(labelSelector map[string]string) ([]string, error)
	ListReleasesNames(labelSelector map[string]string) ([]string, error)
	IsReleaseExists(releaseName string) (bool, error)
}
var Client HelmClient

type HelmClientFactory

type HelmClientFactory struct {
	KubeClient kube.KubernetesClient
}

type MockHelmClient

type MockHelmClient struct {
	HelmClient
	DeleteSingleFailedRevisionExecuted bool
	UpgradeReleaseExecuted             bool
	DeleteReleaseExecuted              bool
	ReleaseNames                       []string
}

func (*MockHelmClient) CommandEnv

func (h *MockHelmClient) CommandEnv() []string

func (*MockHelmClient) DeleteOldFailedRevisions

func (h *MockHelmClient) DeleteOldFailedRevisions(releaseName string) error

func (*MockHelmClient) DeleteRelease

func (h *MockHelmClient) DeleteRelease(_ string) error

func (*MockHelmClient) DeleteSingleFailedRevision

func (h *MockHelmClient) DeleteSingleFailedRevision(_ string) error

func (*MockHelmClient) GetReleaseValues

func (h *MockHelmClient) GetReleaseValues(_ string) (utils.Values, error)

func (*MockHelmClient) IsReleaseExists

func (h *MockHelmClient) IsReleaseExists(_ string) (bool, error)

func (*MockHelmClient) LastReleaseStatus

func (h *MockHelmClient) LastReleaseStatus(_ string) (string, string, error)

func (*MockHelmClient) ListReleases

func (h *MockHelmClient) ListReleases(_ map[string]string) ([]string, error)

func (*MockHelmClient) ListReleasesNames

func (h *MockHelmClient) ListReleasesNames(_ map[string]string) ([]string, error)

func (*MockHelmClient) TillerNamespace

func (h *MockHelmClient) TillerNamespace() string

func (*MockHelmClient) UpgradeRelease

func (h *MockHelmClient) UpgradeRelease(_, _ string, _ []string, _ []string, _ string) error

type TillerOptions

type TillerOptions struct {
	Namespace          string
	HistoryMax         int32
	ListenAddress      string
	ListenPort         int32
	ProbeListenAddress string
	ProbeListenPort    int32
}

TillerOptions

Jump to

Keyboard shortcuts

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