helm

package
v0.0.0-...-860f878 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationPrimaryResource     = "operator-sdk/primary-resource"
	AnnotationPrimaryResourceType = "operator-sdk/primary-resource-type"
)

Variables

This section is empty.

Functions

func NewOwnerReferencePostRenderer

func NewOwnerReferencePostRenderer(ownerReference metav1.OwnerReference, ownerNamespace string) postrender.PostRenderer

NewOwnerReferencePostRenderer creates a Helm PostRenderer that adds the specified OwnerReference to each rendered manifest

func NewRESTClientGetter

func NewRESTClientGetter(config *rest.Config) genericclioptions.RESTClientGetter

func ToValues

func ToValues[V any](helmValues Values, values V) (V, error)

Types

type ChartManager

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

func NewChartManager

func NewChartManager(cfg *rest.Config, driver string) *ChartManager

NewChartManager creates a new Helm chart manager using cfg as the configuration that Helm will use to connect to the cluster when installing or uninstalling charts, and using the specified driver to store information about releases (one of: memory, secret, configmap, sql, or "" (same as "secret")).

func (*ChartManager) UninstallChart

func (h *ChartManager) UninstallChart(ctx context.Context, releaseName, namespace string) (*release.UninstallReleaseResponse, error)

UninstallChart removes a chart from the cluster

func (*ChartManager) UpgradeOrInstallChart

func (h *ChartManager) UpgradeOrInstallChart(
	ctx context.Context, chartDir string, values Values,
	namespace, releaseName string, ownerReference metav1.OwnerReference,
) (*release.Release, error)

UpgradeOrInstallChart upgrades a chart in cluster or installs it new if it does not already exist

type OwnerReferencePostRenderer

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

func (OwnerReferencePostRenderer) Run

func (pr OwnerReferencePostRenderer) Run(renderedManifests *bytes.Buffer) (modifiedManifests *bytes.Buffer, err error)

type Values

type Values map[string]any

func FromValues

func FromValues(values any) Values

func (*Values) GetBool

func (h *Values) GetBool(key string) (bool, bool, error)

GetBool returns the bool value of a nested field. Returns false if value is not found and an error if not a bool.

func (*Values) GetString

func (h *Values) GetString(key string) (string, bool, error)

GetString returns the string value of a nested field. Returns false if value is not found and an error if not a string.

func (*Values) Set

func (h *Values) Set(key string, val any) error

Set sets the value of a nested field to a deep copy of the value provided. Returns an error if value cannot be set because one of the nesting levels is not a map[string]any.

Jump to

Keyboard shortcuts

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