This is a helm plugin to list or even store in an archive the docker images that are referenced from a given chart and values
If you plan to install charts in an environment without internet (such as a VM created and run in a secured cloud space), you would like to know at environment creation time what are the docker images that will be pulled later on during chart installation
To list the docker images referenced by a chart :
-bash-4.2$ helm image list prometheus-operator-0.20.7.tgz
docker.io/bitnami/kube-state-metrics:1.9.7-debian-10-r13
docker.io/bitnami/prometheus-operator:0.40.0-debian-10-r0
To save these docker images in a TAR :
-bash-4.2$ helm image save prometheus-operator-0.20.7.tgz
Pulling image docker.io/bitnami/prometheus-operator:0.40.0-debian-10-r0...
Successfully pulled docker.io/bitnami/prometheus-operator:0.40.0-debian-10-r0 image
Pulling image docker.io/bitnami/kube-state-metrics:1.9.7-debian-10-r13...
Successfully pulled docker.io/bitnami/kube-state-metrics:1.9.7-debian-10-r13 image
Saving all images in prometheus-operator.tar...
Successfully saved all images in prometheus-operator.tar
You can specify values just like standard helm commands with --values
, --set
, --set-string
and --set-file
flags
-
To list the images, a dry-run helm installation is actually performed, then all generated manifests are parsed in a temporary directory to find all container templates for all deployments, statefulsets and jobs following Kubernetes APIs (
k8s.io/apis/apps/v1
andk8s.io/apis/batch/v1
)helm-image support the
weight
attribute introduced in helm-spray to run up to 4 dry-run installations in parallel from the lowest to the highest weight of sub-charts (helm is mono-threaded) -
To save the images, a containerd server is launched in background, with a client pulling all the images, then exporting them in a file
This plugin has only been tested on Windows so far