project-codeflare / appwrapper

AppWrapper controller for Kueue
https://project-codeflare.github.io/appwrapper/
Apache License 2.0
4 stars 4 forks source link

Avoid storing PodSet inference results in Spec #147

Closed dgrove-oss closed 3 weeks ago

dgrove-oss commented 3 weeks ago

Store the results of PodSet inference in the Status, not the Spec. This means we end up doing the inference twice for each AppWrapper (once in the ValidatingWebHook for error checking and again later in the Controller when we have access to the Status), but it avoids mutating the user-provided Spec. Avoiding Spec mutations avoids spurious rejections when the user does multiple kubectl apply operations that do not change the Component itself.