helm

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StableVersionTag tag used to select stable Helm chart repository.
	StableVersionTag = "@stable"
	// LocalVersionTag tag used to select local Helm chart repository.
	LocalVersionTag = "@local"
	// LatestVersionTag tag used to select the latest version from the Helm chart repository.
	LatestVersionTag = "@latest"
	// Namespace in which Botkube is installed.
	Namespace = "botkube"
	// ReleaseName defines Botkube Helm chart release name.
	ReleaseName = "botkube"
	// HelmRepoStable URL of the stable Botkube Helm charts repository.
	HelmRepoStable = "https://charts.botkube.io/"
	// HelmChartName represents Botkube Helm chart name in a given Helm repository.
	HelmChartName = "botkube"
	// LocalChartsPath path to Helm charts in botkube repository.
	LocalChartsPath = "./helm/"
)

Variables

This section is empty.

Functions

func GetLatestVersion

func GetLatestVersion(repoURL string, chart string) (string, error)

GetLatestVersion loads an index file and returns version of the latest chart. Sort by SemVer.

Assumption that all charts are versioned in the same way.

func PrintReleaseStatus

func PrintReleaseStatus(header string, status *printer.StatusPrinter, r *release.Release) error

PrintReleaseStatus returns release description similar to what Helm does, based on https://github.com/helm/helm/blob/f31d4fb3aacabf6102b3ec9214b3433a3dbf1812/cmd/helm/status.go#L126C1-L138C3

Types

type Config

type Config struct {
	ReleaseName  string
	ChartName    string
	Version      string
	RepoLocation string
	AutoApprove  bool

	Namespace                string
	SkipCRDs                 bool
	DisableHooks             bool
	DryRun                   bool
	Force                    bool
	Atomic                   bool
	SubNotes                 bool
	Description              string
	DisableOpenAPIValidation bool
	DependencyUpdate         bool
	Values                   values.Options

	UpgradeConfig
}

Config holds Helm configuration parameters.

type Helm

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

Helm provides option to or update install Helm charts.

func NewHelm

func NewHelm(k8sCfg *rest.Config, forNamespace string) (*Helm, error)

NewHelm returns a new Helm instance.

func (*Helm) Install

func (c *Helm) Install(ctx context.Context, status *printer.StatusPrinter, opts Config) (*release.Release, error)

Install installs a given Helm chart.

type Run

type Run func(ctx context.Context, relName string, chart *chart.Chart, vals map[string]any) (*release.Release, error)

Run provides single function signature both for install and upgrade.

type UpgradeConfig

type UpgradeConfig struct {
	ResetValues bool
	ReuseValues bool
}

UpgradeConfig holds upgrade related settings.

Jump to

Keyboard shortcuts

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