kube-image-prefetch icon indicating copy to clipboard operation
kube-image-prefetch copied to clipboard

Exit containers rather than sleep

Open AverageMarcus opened this issue 4 years ago • 2 comments

As the DaemonSet is recreated on any change to needed images we have no need to keep the pods running on each node. Instead we should be able to exit each container with a 0 exit code and set the restart policy to only restart on failure.

AverageMarcus avatar Oct 01 '20 21:10 AverageMarcus

It looks like this may not be possible with a Daemonset. Maybe It's worth looking in to creating a job that runs on all nodes?

AverageMarcus avatar Oct 02 '20 04:10 AverageMarcus

Why is the Daemonset recreated? Would it not be possible to have it change only if there is an actual change to the Daemonset itself rather than on a derived / dependent resource like a Deployment? If some kind of workload orchestration is required, maybe it would be a reasonable solution to have the Daemonset spawn up jobs that does the actual pull?

hholst80 avatar Apr 25 '21 16:04 hholst80