helm

package
v1.24.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFileMode      os.FileMode = 0o644
	DefaultDirectoryMode os.FileMode = 0o755
)
View Source
const FileProtocolSchema = "file"
View Source
const IndexFileName = "index.yaml"

Variables

This section is empty.

Functions

func ApplyChart

func ApplyChart(ctx context.Context, cfg *rest.Config,
	rlsname, namespace string, chartPath string,
	values map[string]interface{}, files map[string][]byte,
) (*release.Release, error)

func AtomicWriteFile

func AtomicWriteFile(filename string, reader io.Reader, mode os.FileMode) error

func Download

func Download(ctx context.Context, repo, name, version, cachedir string) (string, *chart.Chart, error)

Download helm chart into cachedir saved as {name}-{version}.tgz file.

func Expand

func Expand(dir string, r io.Reader) error

func ExpandChart

func ExpandChart(chartfile string) (string, error)

func HTTPGet

func HTTPGet(ctx context.Context, href string) (io.ReadCloser, error)

func KubegemsUserAgent

func KubegemsUserAgent() string

func LoadAndUpdateChart

func LoadAndUpdateChart(ctx context.Context, repo, nameOrPath, version string) (string, *chart.Chart, error)

name is the name of the chart repo is the url of the chart repository,eg: http://charts.example.com if repopath is not empty,download it from repo and set chartNameOrPath to repo/repopath. LoadChart loads the chart from the repository

func LoadChartWithFileOverride added in v1.24.1

func LoadChartWithFileOverride(cht *chart.Chart, files map[string][]byte) (*chart.Chart, error)

func LoadIndex

func LoadIndex(ctx context.Context, uri string) (*repo.IndexFile, error)

func LoadIndexData

func LoadIndexData(data []byte) (*repo.IndexFile, error)

The source parameter is only used for logging. This will fail if API Version is not set (ErrNoAPIVersion) or if the unmarshal fails.

func LoadLocalIndex

func LoadLocalIndex(path string) (*repo.IndexFile, error)

func LoadRemoteIndex

func LoadRemoteIndex(ctx context.Context, repo string) (*repo.IndexFile, error)

func LocateChart

func LocateChart(ctx context.Context, repoURL, name, version string, cachedir string) (string, error)

LocateChart looks for a chart directory in known places, and returns either the full path or an error.

func LocateChartSuper

func LocateChartSuper(ctx context.Context, repoURL, name, version string) (string, error)

func NewHelmConfig

func NewHelmConfig(ctx context.Context, namespace string, cfg *rest.Config) (*action.Configuration, error)

func ParseResourceReferences

func ParseResourceReferences(resources []byte) []v1beta1.ManagedResource

func RemoveChart

func RemoveChart(ctx context.Context, cfg *rest.Config, rlsname, namespace string) (*release.Release, error)

func TemplateChart

func TemplateChart(ctx context.Context, rlsname, namespace string, chartPath string, values map[string]any) ([]byte, error)

Types

type Apply

type Apply struct {
	Config *rest.Config
}

func New

func New(config *rest.Config) *Apply

func (*Apply) Apply

func (r *Apply) Apply(ctx context.Context, bundle *pluginsv1beta1.Plugin, into string) error

func (*Apply) Remove

func (r *Apply) Remove(ctx context.Context, bundle *pluginsv1beta1.Plugin) error

func (*Apply) Template

func (r *Apply) Template(ctx context.Context, bundle *pluginsv1beta1.Plugin, dir string) ([]byte, error)

type ApplyOptions

type ApplyOptions struct {
	DryRun  bool
	Repo    string
	Version string
}

type ChartDownloader

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

func (*ChartDownloader) GetIndex

func (d *ChartDownloader) GetIndex(ctx context.Context, repoURL string) (*repo.IndexFile, error)

type ReleaseManager

type ReleaseManager struct {
	Config *rest.Config
}

type RemoveOptions

type RemoveOptions struct {
	DryRun bool
}

Jump to

Keyboard shortcuts

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