Version: v1.15.0 Latest Latest

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 40 Imported by: 0




View Source
const (
	HelmPluginsDirectory = "/app/.helm/helmplugin"


This section is empty.


func MergeOverrideValues added in v1.5.0

func MergeOverrideValues(valuesYaml, defaultValues, overrideYaml, overrideValues string) (string, error)

MergeOverrideValues merge override yaml and override kvs defaultValues overrideYaml used for -f option overrideValues used for --set option


type HelmClient

type HelmClient struct {

	Namespace string

	RestConfig *rest.Config
	// contains filtered or unexported fields

func NewClient added in v1.11.0

func NewClient() (*HelmClient, error)

NewClient returns a new Helm client with no construct parameters used to update helm repo data and download index.yaml or helm charts

func NewClientFromNamespace added in v1.11.0

func NewClientFromNamespace(clusterID, namespace string) (*HelmClient, error)

NewClientFromNamespace returns a new Helm client constructed with the provided clusterID and namespace a kubeClient will be initialized to support necessary k8s operations when install/upgrade helm charts

func NewClientFromRestConf

func NewClientFromRestConf(restConfig *rest.Config, ns string) (*HelmClient, error)

NewClientFromRestConf returns a new Helm client constructed with the provided REST config options used to list/uninstall helm release

func (*HelmClient) Clone added in v1.12.0

func (hClient *HelmClient) Clone() (*HelmClient, error)

NOTE: When using this method, pay attention to whether restConfig is present in the original client.

func (*HelmClient) DownloadChart added in v1.11.0

func (hClient *HelmClient) DownloadChart(repoEntry *repo.Entry, chartRef string, chartVersion string, destDir string, unTar bool) error

DownloadChart works like executing `helm pull repoName/chartName --version=version' since pulling from OCI Registry is still considered as an EXPERIMENTAL feature we DO NOT support pulling charts by pulling OCI Artifacts from OCI Registry NOTE consider using os.execCommand('helm pull') to reduce code complexity of offering compatibility since third-party plugins CANNOT be used as SDK

func (*HelmClient) FetchIndexYaml added in v1.11.0

func (hClient *HelmClient) FetchIndexYaml(repoEntry *repo.Entry) (*repo.IndexFile, error)

FetchIndexYaml fetch index.yaml from remote chart repo `helm repo add` and `helm repo update` will be executed

func (*HelmClient) InstallOrUpgradeChart

func (hClient *HelmClient) InstallOrUpgradeChart(ctx context.Context, spec *hc.ChartSpec, opts *hc.GenericHelmOptions) (*release.Release, error)

InstallOrUpgradeChart install or upgrade helm chart, use the same rule with helm to determine weather to install or upgrade

func (*HelmClient) PushChart added in v1.11.0

func (hClient *HelmClient) PushChart(repoEntry *repo.Entry, chartPath string) error

func (*HelmClient) UpdateChartRepo added in v1.11.0

func (hClient *HelmClient) UpdateChartRepo(repoEntry *repo.Entry) (string, error)

UpdateChartRepo works like executing `helm repo update` environment `HELM_REPO_USERNAME` and `HELM_REPO_PASSWORD` are only required for ali acr repos

type KV added in v1.5.0

type KV struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`

Source Files

Jump to

Keyboard shortcuts

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