helm

package
v0.0.0-...-041cddd Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClusterRESTClientGetter

func NewClusterRESTClientGetter(kubeconfig, namespace string) genericclioptions.RESTClientGetter

func NewMemoryRESTClientGetter

func NewMemoryRESTClientGetter(kubeConfig []byte, namespace string) genericclioptions.RESTClientGetter

Types

type Executor

type Executor interface {
	// Install installs the specified chart and returns the name of the Job that executed the task.
	Install(ctx context.Context, chartName string, chartData, values []byte) (string, error)
	// Upgrade upgrades the specified chart and returns the name of the Job that executed the task.
	Upgrade(ctx context.Context, chartName string, chartData, values []byte) (string, error)
	// Uninstall is used to uninstall the specified chart and returns the name of the Job that executed the task.
	Uninstall(ctx context.Context) (string, error)
	// Manifest returns the manifest data for this release.
	Manifest() (string, error)
	// IsReleaseReady checks if the helm release is ready.
	IsReleaseReady(timeout time.Duration) (bool, error)
}

Executor is used to manage a helm release, you can install/uninstall and upgrade a chart or get the status and manifest data of the release, etc.

func NewExecutor

func NewExecutor(namespace, releaseName string, options ...Option) (Executor, error)

NewExecutor generates a new Executor instance with the following parameters:

  • namespace: the namespace of the helm release
  • releaseName: the helm release name
  • options: functions to set optional parameters

type MemoryRESTClientGetter

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

MemoryRESTClientGetter is an implementation of the genericclioptions.RESTClientGetter.

func (*MemoryRESTClientGetter) ToDiscoveryClient

func (*MemoryRESTClientGetter) ToRESTConfig

func (c *MemoryRESTClientGetter) ToRESTConfig() (*rest.Config, error)

func (*MemoryRESTClientGetter) ToRESTMapper

func (c *MemoryRESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)

func (*MemoryRESTClientGetter) ToRawKubeConfigLoader

func (c *MemoryRESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig

type Option

type Option func(*executor)

func SetAnnotations

func SetAnnotations(annotations map[string]string) Option

SetAnnotations sets extra annotations added to all resources in chart.

func SetCreateNamespace

func SetCreateNamespace(createNamespace bool) Option

SetCreateNamespace sets the createNamespace option.

func SetDryRun

func SetDryRun(dryRun bool) Option

SetDryRun sets the dryRun option.

func SetHelmImage

func SetHelmImage(helmImage string) Option

SetHelmImage sets the helmImage option.

func SetKubeConfig

func SetKubeConfig(kubeConfig string) Option

SetKubeConfig sets the kube config data of the target cluster.

func SetLabels

func SetLabels(labels map[string]string) Option

SetLabels sets extra labels added to all resources in chart.

Jump to

Keyboard shortcuts

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