-
Notifications
You must be signed in to change notification settings - Fork 5
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
Adding Resource Fields for api.Machine
#203
Conversation
@@ -765,7 +765,7 @@ func (r *MachineReconciler) setDomainResources(machine *api.Machine, domain *lib | |||
} | |||
} | |||
|
|||
cpu := uint(machine.Spec.CpuMillis / 1000) | |||
cpu := uint(machine.Spec.Resources.CPU().Value() / 1000) |
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.
this logic is wrong. 8.6 will be rounded down to 8 what doesn't make sense for me. I prefer do rounded up.
@afritzler do we need support millis unit? Cannot we support just whole cores? 1, 2, 3, 4, 5, 6, 7, 8, ...
@@ -31,6 +31,7 @@ type MachineSpec struct { | |||
} | |||
|
|||
type MachineStatus struct { | |||
NUMAPlacement NUMAPlacement `json:"numaPlacement,omitempty"` |
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.
here maybe you will need to add ResourceList too
type ResourceName string | ||
|
||
const ( | ||
ResourceCPU ResourceName = "cpu" |
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.
pls don't create own ResourceName or type. Ideally reuse core package: core "github.com/ironcore-dev/ironcore/api/core/v1alpha1"
Closing since not anymore relevant. |
Fixes #181