helmcli

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteCli added in v0.0.2

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

DeleteCli is a client to delete helm release.

func NewDeleteCli added in v0.0.2

func NewDeleteCli(kubeconfigPath string, namespace string) (*DeleteCli, error)

NewDeleteCli returns new DeleteCli instance.

func (*DeleteCli) Delete added in v0.0.2

func (cli *DeleteCli) Delete(releaseName string) error

Delete deletes existing helm release.

type GetCli

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

GetCli is a client to get helm chart from secret storage.

func NewGetCli

func NewGetCli(kubeconfigPath string, namespace string) (*GetCli, error)

NewGetCli returns new GetCli instance.

func (*GetCli) Get

func (cli *GetCli) Get(releaseName string) (*release.Release, error)

Get returns all the information about that given release.

type ListCli added in v0.0.2

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

ListCli is a client to get helm charts from secret storage.

func NewListCli added in v0.0.2

func NewListCli(kubeconfigPath string, namespace string) (*ListCli, error)

NewGetCli returns new GetCli instance.

func (*ListCli) List added in v0.0.2

func (cli *ListCli) List() ([]*release.Release, error)

type ReleaseCli

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

ReleaseCli is a client to deploy helm chart with secret storage.

func NewReleaseCli

func NewReleaseCli(
	kubeconfigPath string,
	namespace string,
	name string,
	ch *chart.Chart,
	labels map[string]string,
	valuesAppliers ...ValuesApplier,
) (*ReleaseCli, error)

NewReleaseCli returns new ReleaseCli instance.

TODO: 1. add flag to disable Wait

func (*ReleaseCli) Deploy

func (cli *ReleaseCli) Deploy(ctx context.Context, timeout time.Duration, valuesAppliers ...ValuesApplier) error

Deploy will install or upgrade that release.

func (*ReleaseCli) Uninstall

func (cli *ReleaseCli) Uninstall() error

Uninstall deletes that release.

type ValuesApplier

type ValuesApplier func(values map[string]interface{}) error

ValuesApplier is to apply new key/values to existing chart's values.

func StringPathValuesApplier

func StringPathValuesApplier(values ...string) ValuesApplier

StringPathValuesApplier applies key/values by string path.

For instance, x.y.z=1 is the same to that YAML value:

```yaml

x:
  y:
    z: 1

```

func YAMLValuesApplier added in v0.0.2

func YAMLValuesApplier(yamlValues string) (ValuesApplier, error)

YAMLValuesApplier applies key/values by YAML.

Jump to

Keyboard shortcuts

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