internal

package
v0.15.2 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: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TempChartFilePermissions = os.FileMode(0644)
	TempChartPrefix          = "temp-helm-chart"
)

Variables

This section is empty.

Functions

func NewCLISettings

func NewCLISettings(kubeConfig, kubeContext, namespace string) *cli.EnvSettings

Build a Helm EnvSettings struct basically, abstracted cli.New() into our own function call because of the weirdness described in the big comment below also configure the Helm client with the Kube config/context of the cluster to perform installation on

Types

type ActionConfigFactory

type ActionConfigFactory interface {
	NewActionConfig(kubeConfig, helmKubeContext, namespace string) (*action.Configuration, *cli.EnvSettings, error)
}

func NewActionConfigFactory

func NewActionConfigFactory() ActionConfigFactory

type ActionListFactory

type ActionListFactory interface {
	ReleaseList(kubeConfig, helmKubeContext, namespace string) (types.ReleaseListRunner, error)
}

Returns a ReleaseListRunner

func NewActionListFactory

func NewActionListFactory(actionConfigFactory ActionConfigFactory) ActionListFactory

type ChartLoader

type ChartLoader interface {
	Load(name string) (*chart.Chart, error)
}

slim interface on top of loader to avoid unnecessary FS calls

func NewChartLoader

func NewChartLoader() ChartLoader

type DefaultHelmClient

type DefaultHelmClient struct {
	Fs              FsHelper
	ResourceFetcher ResourceFetcher
	HelmLoaders     HelmFactories
}

func NewDefaultHelmClient

func NewDefaultHelmClient(
	fs FsHelper,
	resourceFetcher ResourceFetcher,
	helmLoaders HelmFactories) *DefaultHelmClient

func (*DefaultHelmClient) DownloadChart

func (d *DefaultHelmClient) DownloadChart(chartArchiveUri string) (*chart.Chart, error)

func (*DefaultHelmClient) NewInstall

func (d *DefaultHelmClient) NewInstall(kubeConfig, kubeContext, namespace, releaseName string, dryRun bool) (types.HelmInstaller, *cli.EnvSettings, error)

func (*DefaultHelmClient) NewUninstall

func (d *DefaultHelmClient) NewUninstall(kubeConfig, kubeContext, namespace string) (types.HelmUninstaller, error)

func (*DefaultHelmClient) ReleaseExists

func (d *DefaultHelmClient) ReleaseExists(kubeConfig, kubeContext, namespace, releaseName string) (bool, error)

func (*DefaultHelmClient) ReleaseList

func (d *DefaultHelmClient) ReleaseList(kubeConfig, kubeContext, namespace string) (types.ReleaseListRunner, error)

type FsHelper

type FsHelper interface {
	NewTempFile(dir, prefix string) (f afero.File, err error)
	WriteFile(filename string, data []byte, perm os.FileMode) error
	RemoveAll(path string) error
}

interface around needed afero functions

func NewFs

func NewFs(fs afero.Fs) FsHelper

type HelmFactories

type HelmFactories struct {
	ActionConfigFactory ActionConfigFactory
	ActionListFactory   ActionListFactory
	ChartLoader         ChartLoader
}

func NewHelmFactories

func NewHelmFactories() HelmFactories

type ResourceFetcher

type ResourceFetcher interface {
	GetResource(uri string) (io.ReadCloser, error)
}

func NewDefaultResourceFetcher

func NewDefaultResourceFetcher() ResourceFetcher

Directories

Path Synopsis
Package mock_internal is a generated GoMock package.
Package mock_internal is a generated GoMock package.

Jump to

Keyboard shortcuts

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