helm_import rules.
Rules
Repository Rules
helm_import
load("@rules_helm//helm:helm_import.bzl", "helm_import")
helm_import(name, chart, version)
A rule that allows pre-packaged Helm charts to be used within Bazel.
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| chart | A Helm chart's .tgz file. | Label | optional | None |
| version | The version fo the helm chart | String | optional | "" |
helm_import_repository
load("@rules_helm//helm:helm_import.bzl", "helm_import_repository")
helm_import_repository(name, chart_name, repository, sha256, url, version)
A rule for fetching external Helm charts from an arbitrary URL or repository.
With bzlmod, the helm_charts extension in @rules_helm//helm:extensions.bzl fetches
oci:// charts with this rule and stores the digest it looks up in MODULE.bazel.lock.
The repository exposes the chart as a helm_import target. The target takes its name and
version from the Chart.yaml of the chart, not from the file name or the tag of the url.
A chart fetched from oci://.../cert-manager:1.19.4 has the version v1.19.4 if its
Chart.yaml says so, and helm push uses that version as the tag. The name can use
letters, digits, -, . and _, and the version the same characters and +. Neither the
chart name nor the repository name can be license or package_metadata. The target is
aliased to the repository name, so @<name> resolves to it, unless the chart has the same
name as the repository. The repository also describes the chart for supply-chain tooling built on
package_metadata:
//:package_metadataidentifies the chart by purl,pkg:oci/...for a chart from an OCI registry andpkg:generic/...with thedownload_urland sha256checksumotherwise. It is thedefault_package_metadataof the repository.//:licensedeclares the chart's license, the SPDX identifier named by thelicensesorartifacthub.io/licenseannotation ofChart.yamlor recognized in theLICENSEfile shipped with the chart. It isNOASSERTIONwhen neither is available. The license file, if any, is kept next to the chart as the license text.
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this repository. | Name | required | |
| chart_name | Chart name to import. Must be set if repository is specified | String | optional | "" |
| repository | Chart repository url where to locate the requested chart. Mutually exclusive with url. | String | optional | "" |
| sha256 | The expected SHA-256 hash of the chart imported. For an oci:// url, a chart already in the repository cache is then fetched without any request to the registry. | String | optional | "" |
| url | The url where a chart can be directly downloaded. Mutually exclusive with chart_name, repository, and version | String | optional | "" |
| version | Specify a version constraint for the chart version to use. Must be set if repository is specified. | String | optional | "" |