helm

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreHelmValuesEqual

func AreHelmValuesEqual(releaseValues map[string]any, templateValues []byte) bool

Types

type ChartSpec

type ChartSpec struct {
	ReleaseName string
	Namespace   string

	ChartName  string
	Version    string
	ValuesYaml string
}

ChartSpec is subset of type helmclient.ChartSpec(https://pkg.go.dev/github.com/nxtcoder17/go-helm-client#ChartSpec)

type Client

type Client interface {
	// chart repo
	AddOrUpdateChartRepo(ctx context.Context, entry RepoEntry) error

	// release
	GetReleaseValues(ctx context.Context, namespace string, releaseName string) (map[string]any, error)
	GetRelease(ctx context.Context, namespace string, releaseName string) (*release.Release, error)
	HasBeenDeleted(ctx context.Context, namespace string, releaseName string) (bool, error)
	UninstallRelease(ctx context.Context, namespace string, releaseName string) error

	// install or upgrade release based on a chart
	//EnsureRelease(ctx context.Context, namespace string, spec ChartSpec) (*release.Release, error)
	InstallOrUpgradeChart(ctx context.Context, namespace string, spec ChartSpec, opts UpgradeOpts) (*release.Release, error)

	GetLastOperationLogs() string
}

func NewHelmClient

func NewHelmClient(config *rest.Config, opts ClientOptions) (Client, error)

func NewHelmClientOrDie

func NewHelmClientOrDie(config *rest.Config, opts ClientOptions) Client

type ClientOptions

type ClientOptions struct {
	// path to the local helm repository cache, which keeps all index.yaml, tar.gz archives
	RepositoryCacheDir string
	// path to the local helm repository config, which is just an index.yaml containing entries for all charts this client has encountered
	RepositoryConfigFile string
	Logger               logging.Logger
}

type RepoEntry

type RepoEntry struct {
	Name              string
	Url               string
	LocalChartArchive string
}

RepoEntry is subset of type [type](https://pkg.go.dev/helm.sh/helm/v3/pkg/repo#Entry)

type UpgradeOpts

type UpgradeOpts struct {
	UpgradeOnlyIfValuesChanged bool
}

Jump to

Keyboard shortcuts

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