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 ¶
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) 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.