package installer
import "helm.sh/helm/v3/pkg/plugin/installer"
Package installer provides an interface for installing Helm plugins.
Index ¶
- Variables
- func Install(i Installer) error
- func Update(i Installer) error
- type Extractor
- type HTTPInstaller
- func NewHTTPInstaller(source string) (*HTTPInstaller, error)
- func (i *HTTPInstaller) Install() error
- func (i HTTPInstaller) Path() string
- func (i *HTTPInstaller) Update() error
- type Installer
- func FindSource(location string) (Installer, error)
- func NewForSource(source, version string) (Installer, error)
- type LocalInstaller
- func NewLocalInstaller(source string) (*LocalInstaller, error)
- func (i *LocalInstaller) Install() error
- func (b *LocalInstaller) Path() string
- func (i *LocalInstaller) Update() error
- type TarGzExtractor
- type VCSInstaller
Variables ¶
var Debug bool
Debug enables verbose output.
ErrMissingMetadata indicates that plugin.yaml is missing.
ErrPluginNotAFolder indicates that the plugin path is not a folder.
var Extractors = map[string]Extractor{ ".tar.gz": &TarGzExtractor{}, ".tgz": &TarGzExtractor{}, }
Extractors contains a map of suffixes and matching implementations of extractor to return
Functions ¶
func Install ¶
Install installs a plugin.
func Update ¶
Update updates a plugin.
Types ¶
type Extractor ¶
Extractor provides an interface for extracting archives
func NewExtractor ¶
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) (*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 installs into the plugin directory.
Implements Installer.
func (HTTPInstaller) Path ¶
func (i HTTPInstaller) Path() string
Path is overridden because we want to join on the plugin name not the file name
func (*HTTPInstaller) Update ¶
func (i *HTTPInstaller) Update() error
Update updates a local repository Not implemented for now since tarball most likely will be packaged by version
type Installer ¶
type Installer interface { // Install adds a plugin. Install() error // Path is the directory of the installed plugin. Path() string // Update updates a plugin. Update() error }
Installer provides an interface for installing helm client plugins.
func FindSource ¶
FindSource determines the correct Installer for the given source.
func NewForSource ¶
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) (*LocalInstaller, error)
NewLocalInstaller creates a new LocalInstaller.
func (*LocalInstaller) Install ¶
func (i *LocalInstaller) Install() error
Install creates a symlink to the plugin directory.
Implements Installer.
func (*LocalInstaller) Path ¶
func (b *LocalInstaller) Path() string
Path is where the plugin will be installed.
func (*LocalInstaller) Update ¶
func (i *LocalInstaller) Update() error
Update updates a local repository
type TarGzExtractor ¶
type TarGzExtractor struct{}
TarGzExtractor extracts gzip compressed tar archives
func (*TarGzExtractor) Extract ¶
func (g *TarGzExtractor) Extract(buffer *bytes.Buffer, targetDir string) error
Extract extracts compressed archives
Implements Extractor.
type VCSInstaller ¶
VCSInstaller installs plugins from remote a repository.
func NewVCSInstaller ¶
func NewVCSInstaller(source, version string) (*VCSInstaller, error)
NewVCSInstaller creates a new VCSInstaller.
func (*VCSInstaller) Install ¶
func (i *VCSInstaller) Install() error
Install clones a remote repository and installs into the plugin directory.
Implements Installer.
func (*VCSInstaller) Path ¶
func (b *VCSInstaller) Path() string
Path is where the plugin will be installed.
func (*VCSInstaller) Update ¶
func (i *VCSInstaller) Update() error
Update updates a remote repository
Source Files ¶
base.go doc.go http_installer.go installer.go local_installer.go vcs_installer.go
- Version
- v3.17.3 (latest)
- Published
- Apr 9, 2025
- Platform
- linux/amd64
- Imports
- 23 packages
- Last checked
- 1 month ago –
Tools for package owners.