helm

package
v0.0.0-...-60784e1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package helm wraps the helm SDK with the small surface the CLI needs to install or upgrade the educates-installer chart in-process.

It mirrors the operator's helm wrapper at installer/operator/internal/helm (which is not importable from this module — Go internal/ rule). The CLI-side variant differs by accepting a genericclioptions.RESTClientGetter directly (kubectl-style kubeconfig discovery) rather than a pre-built *rest.Config (which is what the operator has from controller-runtime).

Index

Constants

This section is empty.

Variables

View Source
var ErrReleaseNotFound = errors.New("helm release not found")

ErrReleaseNotFound is the stable sentinel for "no release with that name".

Functions

This section is empty.

Types

type Client

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

Client is a small helm action wrapper scoped to one namespace.

func New

func New(getter genericclioptions.RESTClientGetter, namespace string, logOut io.Writer) (*Client, error)

New builds a Client from a kubectl-style RESTClientGetter. Pass the genericclioptions.ConfigFlags the cobra command parsed (--kubeconfig, --context, --namespace) directly — the SDK consumes the same interface the helm CLI does.

logOut receives helm SDK debug output. The CLI usually wants this suppressed in production but visible with --verbose; callers pass io.Discard or os.Stderr accordingly.

func (*Client) Uninstall

func (c *Client) Uninstall(name string) error

Uninstall removes the named release. Idempotent: missing → nil.

func (*Client) UpgradeOrInstall

func (c *Client) UpgradeOrInstall(ctx context.Context, releaseName string, chrt *chart.Chart, vals map[string]any) (*release.Release, error)

UpgradeOrInstall is the idempotent variant: install if no release of that name exists, otherwise upgrade. The CLI's deploy command calls this; reruns of `educates admin platform deploy` should converge.

Jump to

Keyboard shortcuts

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