-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add execCPUAffinity
to the runtime process spec
#174
Conversation
a5b7a17
to
9412a02
Compare
/// ExecCPUAffinity specifies CPU affinity used to execute the process. | ||
/// This setting is not applicable to the container's init process. | ||
pub struct ExecCPUAffinity { | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
/// cpu_affinity_initial is a list of CPUs a runtime parent process to be run on | ||
/// initially, before the transition to container's cgroup. | ||
/// This is a a comma-separated list, with dashes to represent ranges. | ||
/// For example, `0-3,7` represents CPUs 0,1,2,3, and 7. | ||
cpu_affinity_initial: Option<String>, | ||
|
||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
/// cpu_affinity_final is a list of CPUs the process will be run on after the transition | ||
/// to container's cgroup. The format is the same as for `initial`. If omitted or empty, | ||
/// the container's default CPU affinity, as defined by cpu.cpus property, is used. | ||
cpu_affinity_final: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally fields in execCPUAffinity
are initial
and final
.
Since final
is a reserved keyword in Rust, I added cpu_affinity_
as prefix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PTAL @utam0k |
@keisku do you mind a rebase? |
Signed-off-by: keisku <[email protected]>
58232ff
to
6e72c7d
Compare
After rebasing it, I think we should add validation to |
@utam0k PTAL |
Sorry for the late |
Solves #168
Used #136 as a reference to add new field to the spec.