helm

package
v1.27.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package helm provides helm operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// Install installs a Helm chart.
	// Args should include all flags and values for the install command (e.g., ["--namespace", "default", "--values", "values.yaml"]).
	Install(ctx context.Context, releaseName string, chartPath string, args []string) error

	// Uninstall uninstalls a Helm release.
	Uninstall(ctx context.Context, releaseName string, namespace string) error

	// Upgrade upgrades a Helm release.
	// Args should include all flags and values for the upgrade command (e.g., ["--namespace", "default", "--values", "values.yaml"]).
	Upgrade(ctx context.Context, releaseName string, chartPath string, args []string) error

	// List lists Helm releases in a namespace.
	// Returns JSON output from helm list command.
	List(ctx context.Context, namespace string, filter string) (string, error)

	// RepoList lists configured Helm repositories.
	// Returns JSON output from helm repo list command.
	RepoList(ctx context.Context) (string, error)

	// RepoAdd adds a Helm repository or updates it if forceUpdate is true.
	RepoAdd(ctx context.Context, name string, url string, forceUpdate bool) error

	// RepoUpdate updates a specific Helm repository to fetch the latest charts.
	RepoUpdate(ctx context.Context, name string) error
}

Backend defines the interface for low-level helm operations.

type Client

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

Client implements the Backend interface using the helm CLI.

func NewClient

func NewClient(executor executor.CommandRunner) *Client

NewClient creates a new Helm client.

func (*Client) Install

func (c *Client) Install(ctx context.Context, releaseName string, chartPath string, args []string) error

Install installs a Helm chart.

func (*Client) List

func (c *Client) List(ctx context.Context, namespace string, filter string) (string, error)

List lists Helm releases in a namespace. Returns JSON output from helm list command.

func (*Client) RepoAdd

func (c *Client) RepoAdd(ctx context.Context, name string, url string, forceUpdate bool) error

RepoAdd adds a Helm repository or updates it if forceUpdate is true.

func (*Client) RepoList

func (c *Client) RepoList(ctx context.Context) (string, error)

RepoList lists configured Helm repositories. Returns JSON output from helm repo list command.

func (*Client) RepoUpdate

func (c *Client) RepoUpdate(ctx context.Context, name string) error

RepoUpdate updates a specific Helm repository to fetch the latest charts.

func (*Client) Uninstall

func (c *Client) Uninstall(ctx context.Context, releaseName string, namespace string) error

Uninstall uninstalls a Helm release.

func (*Client) Upgrade

func (c *Client) Upgrade(ctx context.Context, releaseName string, chartPath string, args []string) error

Upgrade upgrades a Helm release.

Directories

Path Synopsis
Package helm provides auto-generated mocks for the helm.Backend interface.
Package helm provides auto-generated mocks for the helm.Backend interface.

Jump to

Keyboard shortcuts

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