How do I use graceful preemption in general and still have one type of jobs immediately preempt other jobs on a subset of the cluster?
To illustrate with two job types and two node groups:
Job type A can only run one node group 1 while type B could utilize both node group 1 and 2. Now I want task level graceful preemption in general but a job from group A should immediately preempt group B's tasks on nodes in node group A.
The SDK code example with dynamic node groups kind of achieve that but how should I trigger increase and decrease of node group A (which events should I listen for to trigger an increase or a decrease in the number of nodes in group A)?
Or should I run it at a regular interval as a scheduled task?
Or job template level activation filter for type B tasks to handle the increase of nodes in group B and job template level activation filter for type A tasks to handle the decrease of nodes in group B (the latter should work but I am not sure if
the first would ever be activated?) ?