# Checking what images will be in airgap bundles from helm charts in a KOTS release

**URL:** <https://community.replicated.com/t/checking-what-images-will-be-in-airgap-bundles-from-helm-charts-in-a-kots-release/1371>\
**Category:** Uncategorized\
**Tags:** vendor, airgap, vendor-portal, helm\
**Created:** [February 12, 2024, 5:36pm UTC](https://community.replicated.com/t/checking-what-images-will-be-in-airgap-bundles-from-helm-charts-in-a-kots-release/1371 "2024-02-12T17:36:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Evans\_Mungai](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/evans_mungai/32/546_2.png) [@Evans\_Mungai](https://community.replicated.com/u/Evans_Mungai)\
**Post date:** [February 12, 2024, 5:36pm UTC](https://community.replicated.com/t/checking-what-images-will-be-in-airgap-bundles-from-helm-charts-in-a-kots-release/1371/1 "2024-02-12T17:36:51Z")

</div>

When packaging a helm-based application targeting airgap environments, the resulting airgap bundle that Vendor Portal builds includes the images that the helm charts require to launch pods. To discover what images need to be downloaded, the airgap builder renders the helm templates using `helm template`.

In some cases, charts may require mandatory values which would need to be provided to successfully render. Other times users would need to override specific defaults. This is where  
the [builder](https://docs.replicated.com/reference/custom-resource-helmchart-v2#builder) field comes in. Values defined in this field would be passed in as custom values to the `helm template` command.

If a user would like to check what images will be included in the built airgap bundle, they can run `helm template <chart> --values <builder-values>` and grep their images.

Below is my example release which contains a chart with two subcharts (`replicated` & `cockroachdb`). By default, my chart has the `cockroachdb` chart dependency excluded using `cockroachdb.enable` conditional.

```yaml
dependencies:
  - name: replicated
    repository: oci://registry.replicated.com/library
    version: 1.0.0-beta.14
  - name: cockroachdb
    condition: cockroachdb.enabled
    version: 12.0.0
    repository: "https://charts.cockroachdb.com/"

```

To allow the image builder to include images from `cockroachdb`, I would need to add the [builder](https://docs.replicated.com/reference/custom-resource-helmchart-v2#builder) values below in my `kind: HelmChart` release manifest

```yaml
  builder:
    cockroachdb:
      enabled: true

```

Now lets run `helm template` using my added value overrides. We’ll grep for `image:` to extract image uris from the output. I’m using [yq](https://mikefarah.gitbook.io/yq/) in this example to extract the values of [builder](https://docs.replicated.com/reference/custom-resource-helmchart-v2#builder) field. `umbrella-chart` is the chart that contains my dependency subcharts.

```sh
$ yq .spec.builder my-chart.yaml | helm template umbrella-chart-0.0.1.tgz --values - | grep image:
        image: replicated/replicated-sdk:v1.0.0-beta.14
          image: "busybox"
          image: "cockroachdb/cockroach:v23.2.0"
            image: "gcr.io/cockroachlabs-helm-charts/cockroach-self-signer-cert:1.5"
            image: "gcr.io/cockroachlabs-helm-charts/cockroach-self-signer-cert:1.5"
      image: "cockroachdb/cockroach:v23.2.0"
          image: "gcr.io/cockroachlabs-helm-charts/cockroach-self-signer-cert:1.5"
          image: "gcr.io/cockroachlabs-helm-charts/cockroach-self-signer-cert:1.5"
          image: "busybox"
          image: "cockroachdb/cockroach:v23.2.0"

```

Without the value overrides the same command will not find my `cockroachdb` helm chart images

```sh
$ helm template umbrella-chart-0.0.1.tgz | grep image:
        image: replicated/replicated-sdk:v1.0.0-beta.14

```

Errors such as indentation of keys or spelling of keys/values cannot be detected by the builder, and as such, it’s left to the user to verify that their release has is correct and will not lead to missing images. This simple test can be used as a quick test for your airgap bundle.
