Documentation
¶
Overview ¶
Package installer provides an interface for installing Helm plugins.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Debug bool
Debug enables verbose output.
var ErrMissingMetadata = errors.New("plugin metadata (plugin.yaml) missing")
ErrMissingMetadata indicates that plugin.yaml is missing.
var Extractors = map[string]Extractor{
".tar.gz": &TarGzExtractor{},
".tgz": &TarGzExtractor{},
}
Extractors contains a map of suffixes and matching implementations of extractor to return
Functions ¶
Types ¶
type Extractor ¶
type Extractor interface {
Extract(buffer *bytes.Buffer, targetDir string) error
}
Extractor provides an interface for extracting archives
func NewExtractor ¶
func NewExtractor(source string) (Extractor, error)
NewExtractor creates a new extractor matching the source file name
type HTTPInstaller ¶
type HTTPInstaller struct {
CacheDir string
PluginName string
// contains filtered or unexported fields
}
HTTPInstaller installs plugins from an archive served by a web server.
func NewHTTPInstaller ¶
func NewHTTPInstaller(source string, home helmpath.Home) (*HTTPInstaller, error)
NewHTTPInstaller creates a new HttpInstaller.
func (*HTTPInstaller) Install ¶
func (i *HTTPInstaller) Install() error
Install downloads and extracts the tarball into the cache directory and creates a symlink to the plugin directory in $HELM_HOME.
Implements Installer.
type Installer ¶
type Installer interface {
// Install adds a plugin to $HELM_HOME.
Install() error
// Path is the directory of the installed plugin.
Path() string
// Update updates a plugin to $HELM_HOME.
Update() error
}
Installer provides an interface for installing helm client plugins.
func FindSource ¶
func FindSource(location string, home helmpath.Home) (Installer, error)
FindSource determines the correct Installer for the given source.
func NewForSource ¶
func NewForSource(source, version string, home helmpath.Home) (Installer, error)
NewForSource determines the correct Installer for the given source.
type LocalInstaller ¶
type LocalInstaller struct {
// contains filtered or unexported fields
}
LocalInstaller installs plugins from the filesystem.
func NewLocalInstaller ¶
func NewLocalInstaller(source string, home helmpath.Home) (*LocalInstaller, error)
NewLocalInstaller creates a new LocalInstaller.
func (*LocalInstaller) Install ¶
func (i *LocalInstaller) Install() error
Install creates a symlink to the plugin directory in $HELM_HOME.
Implements Installer.
type TarGzExtractor ¶
type TarGzExtractor struct{}
TarGzExtractor extracts gzip compressed tar archives
type VCSInstaller ¶
type VCSInstaller struct {
Repo vcs.Repo
Version string
// contains filtered or unexported fields
}
VCSInstaller installs plugins from remote a repository.
func NewVCSInstaller ¶
func NewVCSInstaller(source, version string, home helmpath.Home) (*VCSInstaller, error)
NewVCSInstaller creates a new VCSInstaller.
func (*VCSInstaller) Install ¶
func (i *VCSInstaller) Install() error
Install clones a remote repository and creates a symlink to the plugin directory in HELM_HOME.
Implements Installer.