helm

package
v0.0.0-...-2dfab7d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeValues

func MergeValues(
	base map[string]any,
	valueFiles []string,
	values string,
) (map[string]any, error)

MergeValues merges values from different sources similar to helm CLI. The order of precedence is (top is highest)

- set values (--set flag) - value files (--values flag) - base (cli defaults)

This matches helm CLI, except they don't really have "base"

func SetNestedField

func SetNestedField(values map[string]any, field1 string, field2 string, value any)

func ToValidName

func ToValidName(name string) string

Types

type ImageProvider

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

func NewImageProvider

func NewImageProvider(
	defaultLocalImage string,
	imagePublishMap map[string]string,
	imageRegistryHost string,
) *ImageProvider

func (*ImageProvider) GetRegistryHost

func (i *ImageProvider) GetRegistryHost() string

type ValueComputer

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

ValueComputer transforms jetpack CLI inputs into helm values. Right now we mostly copy paste the logic, but the idea is to have individual modules that compute sections of the values. e.g. ambassadorModule, cronjobModule, etc.

func NewValueComputer

func NewValueComputer(
	env api.Environment,
	namespace string,
	execQualifiedSymbol string,
	imageProvider *ImageProvider,
	jetCfg *jetconfig.Config,
	c provider.Cluster,
) *ValueComputer

func (*ValueComputer) AppValues

func (hvc *ValueComputer) AppValues() map[string]any

func (*ValueComputer) Cluster

func (hvc *ValueComputer) Cluster() provider.Cluster

func (*ValueComputer) Compute

func (hvc *ValueComputer) Compute(ctx context.Context) error

Compute converts command options to helm values.

func (*ValueComputer) ComputeHostname

func (hvc *ValueComputer) ComputeHostname(ctx context.Context) (string, error)

func (*ValueComputer) CreateNamespace

func (hvc *ValueComputer) CreateNamespace() bool

func (*ValueComputer) Environment

func (hvc *ValueComputer) Environment() api.Environment

func (*ValueComputer) ImageProvider

func (hvc *ValueComputer) ImageProvider() *ImageProvider

func (*ValueComputer) Namespace

func (hvc *ValueComputer) Namespace() string

func (*ValueComputer) RequiresCustomHost

func (hvc *ValueComputer) RequiresCustomHost(ctx context.Context) (bool, error)

func (*ValueComputer) RuntimeValues

func (hvc *ValueComputer) RuntimeValues() map[string]any

func (*ValueComputer) SetCreateNamespace

func (hvc *ValueComputer) SetCreateNamespace(createNamespace bool)

Jump to

Keyboard shortcuts

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