Installing Image Puller using Helm

This section describes how to install the Image Puller using Helm.

Prerequisites
Procedure

Installing

  1. Clone the Kubernetes Image Puller repository:

    $ git clone https://github.com/che-incubator/kubernetes-image-puller
    $ cd kubernetes-image-puller
  2. Create a namespace to deploy the puller into:

    $ kubectl create namespace k8s-image-puller
  3. To configure the installation, edit the deploy/helm/values.yaml file using following parameters:

    Table 1. Helm parameters for the Image Puller
    Value Usage Default

    deploymentName

    The value of DAEMONSET_NAME and DEPLOYMENT_NAME to be set in the ConfigMap

    kubernetes-image-puller

    image.repository

    The repository to pull the image from

    quay.io/eclipse/kubernetes-image-puller

    image.tag

    The image tag to pull

    latest

    serviceAccount.name

    The name of the ServiceAccount to create

    k8s-image-puller

    configMap.name

    The name of the ConfigMap to create

    k8s-image-puller

    configMap.images

    The value of IMAGES in the ConfigMap

    none

    configMap.cachingIntervalHours

    The value of CACHING_INTERVAL_HOURS in the ConfigMap

    "1"

    configMap.cachingMemoryRequest

    The value of CACHING_MEMORY_REQUEST in the ConfigMap

    "10Mi"

    configMap.cachingMemoryLimit

    The value of CACHING_MEMORY_LIMIT in the ConfigMap

    "20Mi"`

    configMap.cachingCpuRequest

    The value of CACHING_CPU_REQUEST in the ConfigMap

    .05

    configMap.cachingCpuLimit

    The value of CACHING_CPU_LIMIT in the ConfigMap

    .2

    configMap.nodeSelector

    The value of NODE_SELECTOR in the ConfigMap

    "{}"

  4. Run the helm installation command:

    $ helm install kubernetes-image-puller --namespace k8s-image-puller deploy/helm

    Use the --set property.name=<value> parameter to override the values set in the deploy/helm/values.yaml file.

Verifying the installation

  1. Confirm that a new deployment, kubernetes-image-puller, and a DaemonSet (named based on the value of the DAEMONSET_NAME parameter) exist. The DaemonSet needs to have a Pod for each node in the cluster:

    $ kubectl get deployment,daemonset,pod --namespace k8s-image-puller
    NAME                                      READY   UP-TO-DATE   AVAILABLE   AGE
    deployment.apps/kubernetes-image-puller   1/1     1            1           4m21s
    
    NAME                                     DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
    daemonset.apps/kubernetes-image-puller   3         3         3       3            3           <none>          3m40s
    
    NAME                                          READY   STATUS    RESTARTS   AGE
    pod/kubernetes-image-puller-b556c8bd4-qxwwl   1/1     Running   0          4m21s
    pod/kubernetes-image-puller-glh87             3/3     Running   0          3m40s
    pod/kubernetes-image-puller-h7lxf             3/3     Running   0          3m40s
    pod/kubernetes-image-puller-nrt6p             3/3     Running   0          3m40s
  2. Check that the ConfigMap named k8s-image-puller has the values specified in the Helm configuration, or that they contain the default values:

    $ kubectl get configmap k8s-image-puller --output yaml
    apiVersion: v1
    data:
      CACHING_INTERVAL_HOURS: "1"
      CACHING_MEMORY_LIMIT: 20Mi
      CACHING_MEMORY_REQUEST: 10Mi
      DAEMONSET_NAME: kubernetes-image-puller
      IMAGES: java11-maven=quay.io/eclipse/che-java11-maven:nightly; che-theia=eclipse/che-theia:next;
        java-plugin-runner=eclipse/che-remote-plugin-runner-java8:latest;
      NAMESPACE: k8s-image-puller
      NODE_SELECTOR: '{}'
    kind: ConfigMap
    metadata:
      creationTimestamp: "2020-02-17T22:15:22Z"
      name: k8s-image-puller
      namespace: k8s-image-puller
      resourceVersion: "3078"
      selfLink: /api/v1/namespaces/k8s-image-puller/configmaps/k8s-image-puller
      uid: 71bc5ce4-d095-468e-ab7b-23c1e0a36638