helm

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ExportGetValuesForHelmChart     = getValuesForHelmChart
	ExportNewHelmAction             = newHelmAction
	ExportConfigureChartPathOptions = configureChartPathOptions
	ExportInstallHelmRelease        = installRelease
)
View Source
var (

	// IsHelmDebug is configured via a flag and enables extensive debug logging for Helm actions.
	IsHelmDebug bool
)

Functions

func CalculatePluginOptionChecksum

func CalculatePluginOptionChecksum(ctx context.Context, c client.Client, plugin *greenhousev1alpha1.Plugin) (string, error)

CalculatePluginOptionChecksum calculates a hash of plugin option values. Secret-type option values are extracted first and all values are sorted to ensure that order is not important when comparing checksums.

func ConvertFlatValuesToHelmValues added in v0.6.0

func ConvertFlatValuesToHelmValues(values []greenhousev1alpha1.PluginOptionValue) (map[string]any, error)

ConvertFlatValuesToHelmValues shall converts flat values for a Helm chart yaml-compatible structure. Example: The input

global.image.registry=foobar

is transformed to

global:
  image:
    registry: foobar

func GetGreenhouseValues added in v0.6.0

GetGreenhouseValues generate values for greenhouse core resources in the form:

global:
  greenhouse:
    clusterNames:
	  - <name>
	teams:
	  - <name>

func GetReleaseForHelmChartFromPlugin

func GetReleaseForHelmChartFromPlugin(_ context.Context, restClientGetter genericclioptions.RESTClientGetter, plugin *greenhousev1alpha1.Plugin) (*release.Release, error)

GetReleaseForHelmChartFromPlugin returns the Helm release for the given Plugin or an error.

func MergePluginAndPluginOptionValueSlice added in v0.6.0

func MergePluginAndPluginOptionValueSlice(pluginOptions []greenhousev1alpha1.PluginOption, pluginOptionValues []greenhousev1alpha1.PluginOptionValue) []greenhousev1alpha1.PluginOptionValue

func MergePluginOptionValues added in v0.6.0

func MergePluginOptionValues(dst, src []greenhousev1alpha1.PluginOptionValue) []greenhousev1alpha1.PluginOptionValue

MergePluginOptionValues merges the given src into the dst PluginOptionValue slice.

func ObjectMapFromLocalManifest added in v0.9.0

func ObjectMapFromLocalManifest(f ManifestFilter, manifest string) (map[ObjectKey]*ManifestObject, error)

func ObjectMapFromManifest

func ObjectMapFromManifest(restClientGetter genericclioptions.RESTClientGetter, namespace, manifest string, f ManifestFilter) (map[ObjectKey]*ManifestObject, error)

ObjectMapFromManifest returns a map of objects from the manifests matching the filter or an error.

func ObjectMapFromRelease

func ObjectMapFromRelease(restClientGetter genericclioptions.RESTClientGetter, r *release.Release, f ManifestFilter) (map[ObjectKey]*ManifestObject, error)

ObjectMapFromRelease returns a map of objects from the helm release manifest matching the filter or an error.

func TemplateHelmChartFromPlugin

func TemplateHelmChartFromPlugin(ctx context.Context, local client.Client, restClientGetter genericclioptions.RESTClientGetter, pluginDefinitionSpec greenhousev1alpha1.PluginDefinitionSpec, plugin *greenhousev1alpha1.Plugin) (*release.Release, error)

TemplateHelmChartFromPlugin returns the rendered manifest or an error.

func TemplateHelmChartFromPluginOptionValues added in v0.9.0

func TemplateHelmChartFromPluginOptionValues(ctx context.Context, local client.Client, restClientGetter genericclioptions.RESTClientGetter, pluginDefinitionSpec *greenhousev1alpha1.PluginDefinitionSpec, plugin *greenhousev1alpha1.Plugin, optionValues []greenhousev1alpha1.PluginOptionValue) (*release.Release, error)

TemplateHelmChartFromPluginOptionValues returns the rendered manifest or an error. This function

func UninstallHelmRelease

func UninstallHelmRelease(ctx context.Context, restClientGetter genericclioptions.RESTClientGetter, plugin *greenhousev1alpha1.Plugin) (releaseNotFound bool, err error)

UninstallHelmRelease removes the Helm release for the given Plugin.

Types

type CELResolver added in v0.9.0

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

func NewCELResolver added in v0.9.0

func NewCELResolver(optionValues []greenhousev1alpha1.PluginOptionValue) (*CELResolver, error)

NewCELResolver creates a new CELResolver for a given Plugin.

func (*CELResolver) ResolveExpression added in v0.9.0

func (c *CELResolver) ResolveExpression(optionValue greenhousev1alpha1.PluginOptionValue, expressionEvaluationEnabled bool) (*greenhousev1alpha1.PluginOptionValue, error)

type ChartLoaderFunc

type ChartLoaderFunc func(name string) (*chart.Chart, error)
var ChartLoader ChartLoaderFunc = loader.Load

type ManifestFilter

type ManifestFilter interface {
	Matches(obj *resource.Info) bool
}

type ManifestMultipleObjectFilter

type ManifestMultipleObjectFilter struct {
	Filters []ManifestObjectFilter
}

func (*ManifestMultipleObjectFilter) Matches

Matches returns true if the given object matches the filters.

type ManifestObject

type ManifestObject struct {
	Namespace,
	Name string
	Object runtime.Object
}

ManifestObject represents an object in a Helm manifest.

type ManifestObjectFilter

type ManifestObjectFilter struct {
	APIVersion, Kind, Name string
	Annotations            map[string]string
}

ManifestObjectFilter is used to filter for objects in a Helm manifest.

func (*ManifestObjectFilter) Matches

func (o *ManifestObjectFilter) Matches(obj *resource.Info) bool

Matches returns true if the given object matches the filter.

type ObjectKey

type ObjectKey struct {
	GVK       schema.GroupVersionKind
	Namespace string
	Name      string
}

ObjectKey is a unique key for a ManifestObject.

type ObjectList

type ObjectList struct {
	ObjectKey
	*ManifestObject
}

Jump to

Keyboard shortcuts

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