Documentation
¶
Overview ¶
Package helm provides helm operations.
Index ¶
- type Backend
- type Client
- func (c *Client) Install(ctx context.Context, releaseName string, chartPath string, args []string) error
- func (c *Client) List(ctx context.Context, namespace string, filter string) (string, error)
- func (c *Client) RepoAdd(ctx context.Context, name string, url string, forceUpdate bool) error
- func (c *Client) RepoList(ctx context.Context) (string, error)
- func (c *Client) RepoUpdate(ctx context.Context, name string) error
- func (c *Client) Uninstall(ctx context.Context, releaseName string, namespace string) error
- func (c *Client) Upgrade(ctx context.Context, releaseName string, chartPath string, args []string) error
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 ¶
List lists Helm releases in a namespace. Returns JSON output from helm list command.
func (*Client) RepoList ¶
RepoList lists configured Helm repositories. Returns JSON output from helm repo list command.
func (*Client) RepoUpdate ¶
RepoUpdate updates a specific Helm repository to fetch the latest charts.
Click to show internal directories.
Click to hide internal directories.