Documentation
¶
Index ¶
- Constants
- Variables
- func InitTillerProcess(options TillerOptions) error
- func TillerHealthHandler(tillerProbeAddress string, tillerProbePort int32) func(writer http.ResponseWriter, request *http.Request)
- func WithKubeClient(client kube.KubernetesClient)
- type HelmClient
- type HelmClientFactory
- type MockHelmClient
- func (h *MockHelmClient) CommandEnv() []string
- func (h *MockHelmClient) DeleteOldFailedRevisions(releaseName string) error
- func (h *MockHelmClient) DeleteRelease(_ string) error
- func (h *MockHelmClient) DeleteSingleFailedRevision(_ string) error
- func (h *MockHelmClient) GetReleaseValues(_ string) (utils.Values, error)
- func (h *MockHelmClient) IsReleaseExists(_ string) (bool, error)
- func (h *MockHelmClient) LastReleaseStatus(_ string) (string, string, error)
- func (h *MockHelmClient) ListReleases(_ map[string]string) ([]string, error)
- func (h *MockHelmClient) ListReleasesNames(_ map[string]string) ([]string, error)
- func (h *MockHelmClient) TillerNamespace() string
- func (h *MockHelmClient) UpgradeRelease(_, _ string, _ []string, _ []string, _ string) error
- type TillerOptions
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 ¶
Click to show internal directories.
Click to hide internal directories.