helm

package
v0.0.0-...-94e4715 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrRepoAlreadyExists = errors.Error("Repository already exists")
	ErrNoRepositories    = errors.Error("no repositories found. You must add one before updating")
)
View Source
const SearchMaxScore = 25

SearchMaxScore suggests that any score higher than this is not considered a match

Variables

View Source
var ValidName = regexp.MustCompile("^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+$")

ValidName is a regular expression for names.

According to the Kubernetes help text, the regular expression it uses is:

(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?

We modified that. First, we added start and end delimiters. Second, we changed the final ? to + to require that the pattern match at least once. This modification prevents an empty string from matching.

Functions

func FindChartReadme

func FindChartReadme(ch *chart.Chart) *chart.File

func InitEnv

func InitEnv(dataDir string)

func SetupRepoBackendManager

func SetupRepoBackendManager(repos []*repo.Entry) error

func ValidateReleaseName

func ValidateReleaseName(releaseName string) error

Types

type ChartClient

type ChartClient struct {
	*RepoConfig
	// contains filtered or unexported fields
}

func NewChartClient

func NewChartClient(dataDir string) *ChartClient

func (ChartClient) LocateChart

func (c ChartClient) LocateChart(repoName, chartName, version string, repo *repo.Entry) (*chart.Chart, error)

func (ChartClient) LocateChartPath

func (c ChartClient) LocateChartPath(repoName, chartName, version string, repo *repo.Entry) (string, error)

func (ChartClient) NewChartPathOptions

func (c ChartClient) NewChartPathOptions(
	version string,
	verify bool,
	repo *repo.Entry,
) *action.ChartPathOptions

func (ChartClient) SearchRepo

func (c ChartClient) SearchRepo(query api.ChartListInput, version string) ([]*api.ChartResult, error)

func (ChartClient) Show

func (c ChartClient) Show(repoName, chartName, version string) (*chart.Chart, error)

type Client

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

func NewClient

func NewClient(kubeConfig string, namespace string, debug bool) (*Client, error)

func (*Client) Chart

func (c *Client) Chart() IChart

func (*Client) GetConfig

func (c *Client) GetConfig() *action.Configuration

func (*Client) GetSetting

func (c *Client) GetSetting() *cli.EnvSettings

func (*Client) Release

func (c *Client) Release() IRelease

type IChart

type IChart interface {
	List() *action.ChartList
	Show() error
}

type IRelease

type IRelease interface {
	Get() *action.Get
	List() *action.List
	Create(*api.ReleaseCreateInput) (*release.Release, error)
	Update(*api.ReleaseUpdateInput) (*release.Release, error)
	Install() *action.Install
	UnInstall() *action.Uninstall
	Upgrade() *action.Upgrade
	Rollback() *action.Rollback
	History() *action.History
	ReleaseContent(name string, version int) (*release.Release, error)
}

type IRepo

type IRepo interface {
	List() error
	Add() error
	Remove() error
	Update() error
}

type RepoCacheBackend

type RepoCacheBackend struct {
	// contains filtered or unexported fields
}
var RepoBackendManager *RepoCacheBackend

func (*RepoCacheBackend) Update

func (r *RepoCacheBackend) Update(repos ...*repo.Entry) error

type RepoClient

type RepoClient struct {
	*RepoConfig
	// contains filtered or unexported fields
}

func NewRepoClient

func NewRepoClient(dataDir string) (*RepoClient, error)

func (RepoClient) Add

func (c RepoClient) Add(entry *repo.Entry) error

func (RepoClient) GetEntry

func (c RepoClient) GetEntry(name string) (*repo.Entry, error)

func (RepoClient) Remove

func (c RepoClient) Remove(name string) error

func (RepoClient) Update

func (c RepoClient) Update(name string) error

type RepoConfig

type RepoConfig struct {
	RepositoryConfig string
	RepositoryCache  string
	RegistryConfig   string
	PluginDirectory  string
}

func NewRepoConfig

func NewRepoConfig(dataDir string) *RepoConfig

func (*RepoConfig) GetSetting

func (c *RepoConfig) GetSetting() *cli.EnvSettings

Jump to

Keyboard shortcuts

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