helm

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReadmeKey        = "readme"
	ValuesFileName   = "values.yaml"
	ChartFileName    = "Chart.yaml"
	ChartDescKey     = "Chart"
	ChartMetaDataKey = "_Tkeel_Chart_Metadata_"
)
View Source
const (
	PluginConfig = `` /* 748-byte string literal not displayed */

	PluginOAuth2 = `` /* 775-byte string literal not displayed */

)
View Source
const LatestVersion = "latest"

Variables

View Source
var (
	ErrNotFound       = errors.New("not found")
	ErrNoValidURL     = errors.New("no valid url")
	ErrNoChartInfoSet = errors.New("no chart info set in installer")
)
View Source
var SecretContext = "changeme"

Functions

func AbsoluteURL added in v1.0.0

func AbsoluteURL(address string, urls []string) []string

func GetSecret added in v0.4.0

func GetSecret() string

func InjectConfig added in v1.0.0

func InjectConfig(root *chart.Chart, name, secret string) error

func SetSecret added in v0.4.0

func SetSecret(s string)

Types

type Driver

type Driver string

Driver is a short way define for Helm Store Status.

const (
	Secret    Driver = "secret"
	ConfigMap Driver = "configmap"
	Mem       Driver = "memory"
	SQL       Driver = "sql"
)

func (Driver) String

func (d Driver) String() string

type Index

type Index struct {
	URL      string
	RepoName string
	// contains filtered or unexported fields
}

func NewIndex

func NewIndex(url, repoName string) (*Index, error)

NewIndex creates a new Index.

func (*Index) Search

func (r *Index) Search(word string, version string) (PluginResList, error)

func (*Index) Update added in v0.4.0

func (r *Index) Update() (bool, error)

type Installer

type Installer struct {
	// contains filtered or unexported fields
}

func NewHelmInstaller

func NewHelmInstaller(id string, ch *chart.Chart, brief repository.InstallerBrief,
	namespace string, helmConfig *action.Configuration,
) Installer

func NewHelmInstallerQuick

func NewHelmInstallerQuick(id, namespace string, config *action.Configuration) Installer

func (Installer) Annotations

func (h Installer) Annotations() repository.Annotations

func (Installer) Brief

func (h Installer) Brief() *repository.InstallerBrief

func (Installer) GetChart

func (h Installer) GetChart() *chart.Chart

func (Installer) Install

func (h Installer) Install(ops ...*repository.Option) error

func (Installer) Options

func (h Installer) Options() []*repository.Option

func (*Installer) SetChart

func (h *Installer) SetChart(ch *chart.Chart)

func (*Installer) SetOption

func (h *Installer) SetOption(ops ...*repository.Option) error

func (*Installer) SetPluginID

func (h *Installer) SetPluginID(id string)

func (Installer) Uninstall

func (h Installer) Uninstall() error

func (Installer) Upgrade added in v1.0.0

func (h Installer) Upgrade(ops ...*repository.Option) error

type PluginRes

type PluginRes struct {
	Name        string             `json:"name"`
	Version     string             `json:"version"`
	Repo        string             `json:"repository"` // nolint
	URLs        []string           `json:"urls"`       //nolint
	Description string             `json:"description"`
	ChartInfo   *repo.ChartVersion `json:"chart_info"`
}

func (PluginRes) ToInstallerBrief

func (r PluginRes) ToInstallerBrief() *repository.InstallerBrief

type PluginResList

type PluginResList []*PluginRes

func (*PluginResList) ToInstallerBrief

func (r *PluginResList) ToInstallerBrief() []*repository.InstallerBrief

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

Repo is the impl repository.Repository.

func NewHelmRepo

func NewHelmRepo(info *repository.Info, driver Driver, namespace string) (*Repo, error)

func (*Repo) Close

func (r *Repo) Close() error

func (Repo) Config

func (r Repo) Config() *helmAction.Configuration

func (*Repo) Get

func (r *Repo) Get(name, version string) (repository.Installer, error)

Get the Installer of the specified installable.

func (Repo) GetDriver

func (r Repo) GetDriver() Driver

func (*Repo) Info

func (r *Repo) Info() *repository.Info

func (*Repo) Installed

func (r *Repo) Installed() ([]repository.Installer, error)

func (*Repo) Len added in v0.4.0

func (r *Repo) Len() int

func (*Repo) Namespace

func (r *Repo) Namespace() string

func (*Repo) Search

func (r *Repo) Search(word string) ([]*repository.InstallerBrief, error)

Search the word in repo, support "*" to get all installable in repo.

func (*Repo) SetDriver

func (r *Repo) SetDriver(driver Driver) error

func (*Repo) SetInfo

func (r *Repo) SetInfo(info repository.Info)

func (*Repo) SetNamespace

func (r *Repo) SetNamespace(namespace string) error

func (*Repo) Update added in v0.4.0

func (r *Repo) Update() (bool, error)

Jump to

Keyboard shortcuts

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