kubevirt / containerized-data-importer

Data Import Service for kubernetes, designed with kubevirt in mind.
Apache License 2.0
428 stars 269 forks source link

importer-prime fetching the docker image every time. #3542

Open cybercoder opened 3 days ago

cybercoder commented 3 days ago

The pod:

      image: quay.io/kubevirt/cdi-importer:v1.60.3
      imagePullPolicy: IfNotPresent

But it seems it getting deleted after a success.

 Normal   Pulling                 99s   kubelet                  Pulling image "quay.io/kubevirt/cdi-importer:v1.60.3"

And the node has enough disk space and there's no disk pressure:

 /dev/mapper/ubuntu--vg-ubuntu--lv   30G   13G   16G  47% /

There's image when importer prime working (inevitable):

sudo ctr --namespace k8s.io images ls | grep cdi-import
quay.io/kubevirt/cdi-importer:v1.60.3                                                                                          application/vnd.docker.distribution.manifest.v2+json      sha256:14de12bf71e7050d5abaf96176da8f09f3d689a1e6f44958b17216dc6bf8a9a7 120.0 MiB linux/amd64                                                                              io.cri-containerd.image=managed
quay.io/kubevirt/cdi-importer@sha256:14de12bf71e7050d5abaf96176da8f09f3d689a1e6f44958b17216dc6bf8a9a7                          application/vnd.docker.distribution.manifest.v2+json      sha256:14de12bf71e7050d5abaf96176da8f09f3d689a1e6f44958b17216dc6bf8a9a7 120.0 MiB linux/amd64

But it disapears after the pod complete or error and destroy.

Environment:

awels commented 3 days ago

So CDI doesn't influence the behavior of kubernetes. As you can see we set the policy to IfNotPresent, and it downloads the image if it is not present. But what kubernetes does afterwards we as CDI cannot influence.