helm

package
v0.0.1-alpha.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientOption

type ClientOption func(*Options)

func WithChartPath

func WithChartPath(chartPath string) ClientOption

WithChartPath - sets the chartPath flag for the helm client Note: Absolute paths are preferred

func WithClusterName

func WithClusterName(clusterName string) ClientOption

WithClusterName - sets the clusterName flag for the helm client used in a kind cluster scenario. By providing a kind cluster name, the kubeconfig will be fetched for the kind cluster using kind.getKubeCfg(clusterName, false)

func WithKubeConfigPath

func WithKubeConfigPath(kubeConfigPath string) ClientOption

WithKubeConfigPath - sets the kubeConfigPath flag for the helm client

func WithNamespace

func WithNamespace(namespace string) ClientOption

WithNamespace - sets the namespace flag for the helm client namespace will be used to install the chart or render the template

func WithReleaseName

func WithReleaseName(releaseName string) ClientOption

WithReleaseName - sets the releaseName flag for the helm client release name will be used to install the chart or render the template with release labels

func WithValuesPath

func WithValuesPath(valuesPath string) ClientOption

WithValuesPath - sets the valuesPath flag for the helm client values provided in the file will be used to render the chart if no values path is provided, the default values will be used from util.GetManagerHelmValues()

type IHelm

type IHelm interface {
	Install(ctx context.Context, dryRun bool) (*release.Release, error)
	Template(ctx context.Context) (string, error)
}

IHelm - interface wrapper for an actual Helm client

func NewClient

func NewClient(ctx context.Context, opts ...ClientOption) (IHelm, error)

NewClient - creates a new Helm client with given ClientOption options currently supporting helm install and template actions and can be extended to support other actions

type Options

type Options struct {
	ClusterName    string
	ReleaseName    string
	Namespace      string
	ChartPath      string
	ValuesPath     *string
	KubeConfigPath string
}

Jump to

Keyboard shortcuts

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