
Instead of modifying the PodSchedulingContext and then creating or updating it, now the required changes (selected node, potential nodes) are tracked and the actual input for an API call is created if (and only if) needed at the end. This makes the code easier to read and change. In particular, replacing the Update call with Patch or Apply is easy.