Add support for windows CPU affinity
This PR adds support for certain CRI fields in OCI runtime spec for supporting CPU affinity for windows containers.
CRI PR : https://github.com/kubernetes/kubernetes/pull/124285 Github issue: https://github.com/kubernetes/kubernetes/issues/125262 KEP: https://github.com/kubernetes/kubernetes/issues/125262
cc @jsturtevant @kevpar @aravindhp @marosset
@AkihiroSuda @thaJeztah could you please take a look? :) thanks!
Is there a compelling reason not to roughly match the naming convention adopted for Linux in #1253?
Also, please don't mark conversations with useful discussion/links as "resolved" especially if the PR itself didn't change as a result of the discussion but the discussion is still useful and potentially something someone else might reasonably ask about or want to discuss -- it makes them much more difficult to discover when reading the PR's comments.
Is there a compelling reason not to roughly match the naming convention adopted for Linux in #1253?
For cpu's, Linux is a simple list where as on windows it is a bitmap with a group number (https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/miniport/ns-miniport-_group_affinity) and the naming/structure was used to map to those Windows specific concepts
For memory, I think it was the same idea, making sure it was known this is "perferred" but not guarenteed do to the Windows API's. Depending on outcome of https://github.com/opencontainers/runtime-spec/pull/1258#discussion_r1648430504 we might not have this field
@AkihiroSuda @kevpar addressed review comments. Would you be able to take a look when you have some time please? Thanks!
@tianon @kolyshkin @kevpar @jsturtevant could you please take a look at this PR when you have some time please? Thanks!
/lgtm for the functionality, I will defer to the reviewers here on the naming discussion
@tianon @kolyshkin @AkihiroSuda @thaJeztah could you please take a look when you have a chance please? thanks!
LGTM
@tianon @kevpar @kolyshkin could you give a final look?
A couple really minor nits, but I think this is probably fine.
Maybe we need to update the JSON schema also?
https://github.com/opencontainers/runtime-spec/blob/09fcb39bb7185b46dfb206bc8f3fea914c674779/schema/config-windows.json#L30-L43
Addressed this!
@tianon would you be able to take a look at this PR when you have a chance please? Thanks!
LGTM