Helm images

HelmImageInfo is the contract between rules_helm and the rules that build container images. helm_package.images accepts any target that provides it.

rules_helm provides it itself for oci_push, image_push and image_import targets by recognising them by shape. The companion modules provide it from the image rules' own providers instead:

  • rules_helm_img: helm_img_image
  • rules_helm_oci: helm_oci_image

helm_image is the reference implementation for anything else.

Rules

Providers

helm_image

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

helm_image(name, manifest, pusher, remote_tags, repository)

Describe a container image to rules_helm from plain files.

This is the reference implementation of HelmImageInfo, for images that are built or pushed by something rules_helm does not know about. Values refer to it by this target's label, e.g. {@//app:image}.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
manifestThe raw OCI manifest or index exactly as it is pushed. Its sha256 is the digest stamped into the chart.Labelrequired
pusherAn executable that pushes the image. Run before the chart is installed or pushed. Leave unset for images that are only referenced.LabeloptionalNone
remote_tagsA file containing the remote tags, one per line. With exactly one tag, values may stamp {@label.tag}.LabeloptionalNone
repositoryA file containing <registry>/<repository> on a single line, with no scheme.Labelrequired

HelmImageInfo

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

HelmImageInfo(aliases, label, manifest, pusher, repository, runfiles, tags)

A container image a helm chart refers to.

This is the contract between rules_helm and the rules that build images. rules_helm only reads it: the chart's values.yaml has {@label} style references replaced with repository@digest, and pusher is run before the chart is installed or pushed. Any rule may provide it. rules_helm adapts oci_push, image_push and image_import targets itself and the companion modules (rules_helm_img, rules_helm_oci) provide it from their image rules' own providers.

FIELDS

NameDescription
aliaseslist[Label]: Other labels values may use to refer to the image.
labelLabel: The label values use to refer to the image, e.g. {@//app:image.push}.
manifestFile: The raw OCI manifest or index, byte for byte what is pushed or was pulled. Its sha256 is the image digest.
pusherFile (optional): An executable that pushes the image. None for pulled images, which are referenced but never pushed.
repositoryFile: A single line, <registry>/<repository>, with no scheme.
runfilesrunfiles: Everything pusher needs at run time.
tagsFile (optional): The remote tags, one per line.