helm_command rules.

Rules

helm_command

load("@rules_helm//helm:helm_command.bzl", "helm_command")

helm_command(name, data, command, helm_opts, install_name, opts, package, values)

Produce an executable that invokes helm with an arbitrary subcommand. Useful for wrapping helm plugins (e.g. helm-diff) without requiring a dedicated rule for each plugin.

Example:

load("@rules_helm//helm:defs.bzl", "helm_command")

helm_command(
    name = "my_chart.diff",
    command = ["diff", "upgrade"],
    install_name = "my-chart",
    package = ":my_chart",
)

Any helm plugin referenced by command must be registered in the active helm toolchain (see helm_plugin / helm_toolchain).

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
dataAdditional data to pass to the helm invocation.List of labelsoptional[]
commandSubcommand tokens placed between helm_opts and opts (e.g. ["diff", "upgrade"]).List of stringsrequired
helm_optsAdditional arguments to pass to helm before the subcommand.List of stringsoptional[]
install_nameRelease name appended as a positional after opts. Omitted when unset.Stringoptional""
optsAdditional arguments to pass after the subcommand.List of stringsoptional[]
packageOptional helm package. When set, its chart path is appended as the final positional argument.LabeloptionalNone
valuesValues files to pass to the subcommand via --values.List of labelsoptional[]