helmgap

A library to create a container image repository archive for airgap installations of a Helm Chart

License

License

GroupId

GroupId

uk.co.solong
ArtifactId

ArtifactId

helmgap
Last Version

Last Version

1.6
Release Date

Release Date

Type

Type

jar
Description

Description

helmgap
A library to create a container image repository archive for airgap installations of a Helm Chart
Source Code Management

Source Code Management

https://github.com/danielburrell/helmgap

Download helmgap

How to add to project

<!-- https://jarcasting.com/artifacts/uk.co.solong/helmgap/ -->
<dependency>
    <groupId>uk.co.solong</groupId>
    <artifactId>helmgap</artifactId>
    <version>1.6</version>
</dependency>
// https://jarcasting.com/artifacts/uk.co.solong/helmgap/
implementation 'uk.co.solong:helmgap:1.6'
// https://jarcasting.com/artifacts/uk.co.solong/helmgap/
implementation ("uk.co.solong:helmgap:1.6")
'uk.co.solong:helmgap:jar:1.6'
<dependency org="uk.co.solong" name="helmgap" rev="1.6">
  <artifact name="helmgap" type="jar" />
</dependency>
@Grapes(
@Grab(group='uk.co.solong', module='helmgap', version='1.6')
)
libraryDependencies += "uk.co.solong" % "helmgap" % "1.6"
[uk.co.solong/helmgap "1.6"]

Dependencies

compile (8)

Group / Artifact Type Version
commons-io : commons-io jar 2.6
org.apache.commons : commons-lang3 jar 3.10
org.zeroturnaround : zt-exec jar 1.11
org.slf4j : slf4j-api jar 1.7.30
com.fasterxml.jackson.dataformat : jackson-dataformat-yaml jar 2.9.8
com.fasterxml.jackson.core : jackson-databind jar 2.10.3
com.fasterxml.jackson.core : jackson-core jar 2.10.3
org.junit.jupiter : junit-jupiter-engine jar 5.5.2

test (1)

Group / Artifact Type Version
org.slf4j : slf4j-simple jar 1.7.30

Project Modules

There are no modules declared in this project.

helmgap

Helmgap allows you to deploy a Helm Chart into airgap environments by generating a container image registry archive for a given chart. Under the hood it wraps a combination of Helm and kbld (k14s) to firstly generate the manifest with images and then derive the chart images.

The end product is a tar file containing all the images required by the chart which can be read using docker load registry.tar or crd import registry.tar

Requirements

You will need

  • helm (brew install helm)
  • kbld (brew tap k14s/tap && brew install kbld)
  • Java 9+
  • Linux

Usage

  1. Add the helmgap dependency to your maven pom.xml
<dependency>
    <groupId>uk.co.solong</groupId>
    <artifactId>helmgap</artifactId>
    <version>1.6</version>
</dependency>
  1. Call the library
ChartDescriptor chartDescriptor = ChartDescriptor.byShortName("stable", "hackmd", "0.1.0");
HelmGap helmgap = new HelmGap();
AirgapInstall result = helmgap.buildAirgap(chartDescriptor);
File imagesArchive = result.getAirgapInstallerArchive(); //<-- this is your airgap!

If you inspect imagesArchive, you'll find hackmd-airgap-0.1.0.tgz with all the images inside.


Optional Features

Optionally, you can also get a copy of the original helm chart as well (handy!):

File chart = files.getOriginalChart()

In this case this would return hackmd-0.1.0.tgz - the original helm chart.

Advanced Usage

There are 3 ways to tell HelmGap where your chart is located. All correspond to the helm pull syntax:

  • Short Name (can be used when the repository already exists on the machine via helm repo add)
ChartDescriptor chartDescriptor = ChartDescriptor.byShortName("stable", "hackmd", "0.1.0");
  • Repo URL (can be used when the repo url is known, but the repo has not necessarily been added to the machine)
ChartDescriptor chartDescriptor = ChartDescriptor.byRepoUrl("https://kubernetes-charts.storage.googleapis.com", "hackmd", "0.1.0");
  • Chart URL (use if only the chart url is known)
ChartDescriptor chartDescriptor = ChartDescriptor.byChartUrl("http://storage.googleapis.com/kubernetes-charts/dask-1.1.0.tgz");

Versions

Version
1.6
1.4