internal

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 23 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

func NewHelmClientForFileConfig added in v0.16.0

func NewHelmClientForFileConfig(
	resourceFetcher ResourceFetcher,
	helmLoaders HelmFactories,
	kubeConfig, kubeContext string,
) types.HelmClient

Accepts kubeconfig persisted on disk.

func NewHelmClientForMemoryConfig added in v0.16.0

func NewHelmClientForMemoryConfig(
	resourceFetcher ResourceFetcher,
	helmLoaders HelmFactories,
	config clientcmd.ClientConfig,
) types.HelmClient

Accepts kubeconfig from memory.

func NewInMemoryRESTClientGetter added in v0.16.0

func NewInMemoryRESTClientGetter(rawConfig clientcmd.ClientConfig) genericclioptions.RESTClientGetter

func ToDiscoveryClient added in v0.16.0

func ToDiscoveryClient(restCfg *rest.Config) (discovery.CachedDiscoveryInterface, error)

func ToRESTMapper added in v0.16.0

func ToRESTMapper(restCfg *rest.Config) (meta.RESTMapper, error)

Types

type ActionConfigFactory

type ActionConfigFactory interface {
	NewActionConfigFromFile(kubeConfig, helmKubeContext, namespace string) (*action.Configuration, *cli.EnvSettings, error)
	NewActionConfigFromMemory(config clientcmd.ClientConfig, namespace string) (*action.Configuration, *cli.EnvSettings, error)
}

func NewActionConfigFactory

func NewActionConfigFactory() ActionConfigFactory

type ActionListFactory

type ActionListFactory interface {
	ReleaseList(actionConfig *action.Configuration, namespace string) types.ReleaseListRunner
}

Returns a ReleaseListRunner

func NewActionListFactory

func NewActionListFactory(actionConfigFactory ActionConfigFactory) ActionListFactory

type ChartLoader

type ChartLoader interface {
	Load(archiveFile io.Reader) (*chart.Chart, error)
}

slim interface on top of loader to avoid unnecessary FS calls

func NewChartLoader

func NewChartLoader() ChartLoader

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