zuke.tools.helm

← Python API reference

@zuke/helm 1.1.1: @zuke/helm — typed HelmTasks wrappers for the [Helm](https://helm.sh) CLI, for packaging and deploying to Kubernetes from a Zuke build.

Symbols

#

HelmDependencyUpdateSettings

class
class HelmDependencyUpdateSettings(HelmSettings)

Settings for helm dependency update.

  • chart(path: str) -> Self

    The chart path whose dependencies to update (required).

#

HelmGetAllSettings

class
class HelmGetAllSettings(HelmSettings)

Settings for helm get all (everything recorded about a release).

  • release(name: str) -> Self

    The release to read (required).

  • revision(number: float) -> Self

    Read a specific revision instead of the latest (--revision). A whole number from 1 up.

  • template(value: str) -> Self

    Format the output with a Go template over .Release (--template) — e.g. {{.Release.Version}} prints just the current revision.

#

HelmInstallSettings

class
class HelmInstallSettings(HelmValuesSettings)

Settings for helm install.

  • release(name: str) -> Self

    The release name (required).

  • chart(ref: str) -> Self

    The chart reference or path (required).

  • create_namespace() -> Self

    Create the release namespace if absent (--create-namespace).

  • wait() -> Self

    Wait until resources are ready (--wait).

  • atomic() -> Self

    Roll back on failure (--atomic).

  • timeout(duration: str) -> Self

    Operation timeout, e.g. 5m (--timeout).

  • dry_run() -> Self

    Simulate the install (--dry-run).

#

HelmLintSettings

class
class HelmLintSettings(HelmSettings)

Settings for helm lint.

  • chart(path: str) -> Self

    The chart path to lint (required).

  • values(path: str) -> Self

    Add a values file (--values); repeatable.

  • strict() -> Self

    Treat warnings as errors (--strict).

#

HelmPackageSettings

class
class HelmPackageSettings(HelmSettings)

Settings for helm package.

  • chart(path: str) -> Self

    The chart path to package (required).

  • destination(path: str) -> Self

    Output directory for the packaged chart (--destination).

  • version(value: str) -> Self

    Set the chart version (--version).

  • app_version(value: str) -> Self

    Set the chart appVersion (--app-version).

#

HelmRepoAddSettings

class
class HelmRepoAddSettings(HelmSettings)

Settings for helm repo add.

  • name(value: str) -> Self

    The repository name (required).

  • url(value: str) -> Self

    The repository URL (required).

#

HelmRollbackSettings

class
class HelmRollbackSettings(HelmSettings)

Settings for helm rollback.

  • release(name: str) -> Self

    The release to roll back (required).

  • revision(number: float) -> Self

    The revision to roll back to. Without one, helm rolls back to the previous revision. A whole number from 1 up.

  • wait() -> Self

    Wait until resources are ready (--wait).

  • timeout(duration: str) -> Self

    Operation timeout, e.g. 5m (--timeout).

  • history_max(count: float) -> Self

    Keep at most count revisions of the release; 0 keeps them all (--history-max). A whole number from 0 up.

#

HelmSettings

class
class HelmSettings(ToolSettings)

Base for all helm subcommand settings: the binary is helm, and the cluster-targeting flags (--namespace, --kube-context, --kubeconfig) are shared by every subcommand.

  • namespace(name: str) -> Self

    Target a namespace (--namespace).

  • kube_context(name: str) -> Self

    Use a named kube context (--kube-context).

  • kubeconfig(path: str) -> Self

    Use an explicit kubeconfig file (--kubeconfig).

#

HelmTasks

class
class HelmTasks

Typed task functions for the helm CLI.

  • static async install(ctx: ServiceContext, configure: Callable[[HelmInstallSettings], HelmInstallSettings] | None=None) -> ExecResult

    Install a chart: helm install.

  • static async upgrade(ctx: ServiceContext, configure: Callable[[HelmUpgradeSettings], HelmUpgradeSettings] | None=None) -> ExecResult

    Upgrade (or install) a release: helm upgrade.

  • static async uninstall(ctx: ServiceContext, configure: Callable[[HelmUninstallSettings], HelmUninstallSettings] | None=None) -> ExecResult

    Uninstall a release: helm uninstall.

  • static async rollback(ctx: ServiceContext, configure: Callable[[HelmRollbackSettings], HelmRollbackSettings] | None=None) -> ExecResult

    Roll a release back to an earlier revision: helm rollback.

  • static async get_all(ctx: ServiceContext, configure: Callable[[HelmGetAllSettings], HelmGetAllSettings] | None=None) -> ExecResult

    Read everything recorded about a release: helm get all.

  • static async template(ctx: ServiceContext, configure: Callable[[HelmTemplateSettings], HelmTemplateSettings] | None=None) -> ExecResult

    Render manifests locally: helm template.

  • static async lint(ctx: ServiceContext, configure: Callable[[HelmLintSettings], HelmLintSettings] | None=None) -> ExecResult

    Lint a chart: helm lint.

  • static async dependency_update(ctx: ServiceContext, configure: Callable[[HelmDependencyUpdateSettings], HelmDependencyUpdateSettings] | None=None) -> ExecResult

    Update chart dependencies: helm dependency update.

  • static async repo_add(ctx: ServiceContext, configure: Callable[[HelmRepoAddSettings], HelmRepoAddSettings] | None=None) -> ExecResult

    Add a chart repository: helm repo add.

  • static async package(ctx: ServiceContext, configure: Callable[[HelmPackageSettings], HelmPackageSettings] | None=None) -> ExecResult

    Package a chart: helm package.

#

HelmTemplateSettings

class
class HelmTemplateSettings(HelmValuesSettings)

Settings for helm template (render manifests locally).

  • release(name: str) -> Self

    The release name (required).

  • chart(ref: str) -> Self

    The chart reference or path (required).

  • output_dir(path: str) -> Self

    Write rendered manifests to a directory (--output-dir).

#

HelmUninstallSettings

class
class HelmUninstallSettings(HelmSettings)

Settings for helm uninstall.

  • release(name: str) -> Self

    The release name to uninstall (required).

  • keep_history() -> Self

    Retain release history (--keep-history).

  • ignore_not_found() -> Self

    Treat "release not found" as a successful uninstall (--ignore-not-found, Helm 3.13 and later).

  • wait() -> Self

    Wait until removal completes (--wait).

#

HelmUpgradeSettings

class
class HelmUpgradeSettings(HelmValuesSettings)

Settings for helm upgrade.

  • release(name: str) -> Self

    The release name (required).

  • chart(ref: str) -> Self

    The chart reference or path (required).

  • install() -> Self

    Install the release if it does not exist (--install).

  • reuse_values() -> Self

    Reuse the last release's values and merge the command line's --set and --values over them (--reuse-values).

  • reset_then_reuse_values() -> Self

    Reset to the new chart's default values, apply the last release's values over them, then the command line's (--reset-then-reuse-values, Helm 3.14 and later). Unlike reuseValues, a default the new chart changed is picked up.

  • history_max(count: float) -> Self

    Keep at most count revisions of the release; 0 keeps them all (--history-max). A whole number from 0 up.

  • create_namespace() -> Self

    Create the release namespace if absent (--create-namespace).

  • wait() -> Self

    Wait until resources are ready (--wait).

  • atomic() -> Self

    Roll back on failure (--atomic).

  • timeout(duration: str) -> Self

    Operation timeout, e.g. 5m (--timeout).

#

HelmValuesSettings

class
class HelmValuesSettings(HelmSettings)

Base for value-bearing commands (install/upgrade/template).

  • values(path: str) -> Self

    Add a values file (--values/-f); repeatable.

  • set(name: str, value: str) -> Self

    Override a single value (--set name=value); repeatable.

  • set_string(name: str, value: str) -> Self

    Override a single value as a string (--set-string name=value); repeatable. Unlike --set, helm does not infer a type, so a tag such as 1.10 or 2024 stays a string.

  • version(value: str) -> Self

    Pin the chart version (--version).