Slow starts of Eclipse Che workspaces may be caused by waiting for the underlying cluster to pull images used in workspaces from remote registries. As such, pre-pulling images can improve start times significantly. The Kubernetes Image Puller can be used to pre-pull images and shorten workspace start times.
The Kubernetes Image Puller is an additional deployment that runs alongside Eclipse Che. Given a list of images to pre-pull, the application runs inside a cluster and creates a DaemonSet that pulls the images on each node.
The application can be deployed via Helm or by processing and applying OpenShift templates.
The Kubernetes Image Puller pulls its configuration from a ConfigMap with the following available parameters:
| Parameter | Usage | Default |
|---|---|---|
|
Interval, in hours, between checking health of DaemonSets |
|
|
The memory request for each cached image when the puller is running |
|
|
The memory limit for each cached image when the puller is running |
|
|
Name of DaemonSet to be created |
|
|
Namespace where DaemonSet is to be created |
|
|
List of images to be cached, in the format |
Contains a default list of images, but should be configured when deploying |
|
Node selector applied to the Pods created by the DaemonSet |
|
The default memory requests and limits ensure that the container has enough memory to start. When changing CACHING_MEMORY_REQUEST or CACHING_MEMORY_LIMIT, you will need to consider the total memory allocated to the DaemonSet Pods in the cluster:
(memory limit) * (number of images) * (number of nodes in the cluster)
For example, running the image puller that caches 5 images on 20 nodes, with a container memory limit of 20Mi requires 2000Mi of memory.