Avoid Jupyter user server pod placing on a node in which continues image puller pulling the image

Hi,
In our use case 10 users may login at same time, we’ve 3 user place holders placed , there is chance a new node pop-ups and continues image puller pod pulls image on to node. And some of the user pods are placed on that node where image pulling is in progress and taking more time to get into running state by user server pod.

How to get user server pods are not scheduled on a node where the image is still being pulled by a continuous image puller (and are scheduled only after the image is successfully pulled).

This approach ensures that user server pods are only scheduled on nodes where the image is already available.

How to achieve with our jupyterhub config . I know we can use following config

affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- jupyterhub
topologyKey: kubernetes.io/hostname

but how to place above config in latest jupyterhub values.yml ? ( singleuser.extraPodAntiAffinity does not accepting above all parameters)

Thank you

Hi @manics

Is there anyway to apply above config using KubeSpawner ?