Skip to main content

Component Management

Purpose: For operators, shows how to add/remove container images, Helm charts, OS packages, and custom binaries.

Prerequisites

  • opencenter-airgap CLI installed
  • An initialized build environment (opencenter-airgap init already run)
  • config/versions.env configured with base versions

How Components Work

The build reads config/versions.env and auto-generates config/components.yaml. This manifest lists every artifact the build collects. You can extend it with custom entries using the add command — manual additions are preserved across regenerations.

The manifest has these top-level sections: kubernetes, tools, repositories, images, and charts.

Steps

Add a container image

opencenter-airgap add image registry.example.com/myapp:v3.2.1

This appends the image to the images section of components.yaml. The next build downloads and includes it in the Zarf artifact.

To add multiple images at once, list them in a file:

# custom-images.txt
registry.example.com/myapp:v3.2.1
registry.example.com/sidecar:v1.0.0
ghcr.io/org/worker:latest
while read -r img; do
opencenter-airgap add image "$img"
done < custom-images.txt

Add a CLI tool or binary

opencenter-airgap add tool \
--name velero \
--version v1.15.0 \
--url https://github.com/vmware-tanzu/velero/releases/download/v1.15.0/velero-v1.15.0-linux-amd64.tar.gz

Add a Helm chart

Helm charts are declared in components.yaml under the charts key. Edit the file directly:

charts:
- name: my-chart
repo: https://charts.example.com
version: v2.0.0

Scan repositories for images

The scan command clones repositories listed in versions.env and extracts image references from Kubespray roles, Helm values, and Kustomize manifests:

# Scan all repos defined in versions.env
opencenter-airgap scan --repos

# Scan a specific local directory
opencenter-airgap scan --repo build/kubespray

Discovered images are merged into components.yaml. Duplicates are deduplicated automatically.

Remove a component

Edit config/components.yaml directly and delete the entry. The next build will skip the removed component.

# Example: remove a tool entry
vim config/components.yaml
# Delete the tool block, then rebuild
opencenter-airgap build

Force-regenerate the manifest

If components.yaml has drifted or you want a clean slate from versions.env:

opencenter-airgap build --force-regenerate

This discards all manual additions and regenerates from versions.env only.

Verification

After modifying components, validate the manifest:

opencenter-airgap validate

This checks that every entry in components.yaml has a valid URL, version, and (where applicable) checksum reference.

Check the current component counts:

opencenter-airgap status

Troubleshooting

SymptomLikely causeFix
Manual additions lost after buildUsed --force-regenerateOmit that flag; manual edits are preserved by default
Duplicate image entriesAdded same image twiceRun opencenter-airgap validate; duplicates are flagged
Scan finds no imagesRepository not cloned yetRun opencenter-airgap scan --repos to clone first
Chart download failsIncorrect repo URL or versionVerify the Helm repo URL and chart version exist