Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

so-sahu
Copy link
Contributor

@so-sahu so-sahu commented Feb 23, 2024

Fixes #181

@so-sahu so-sahu self-assigned this Feb 23, 2024
@so-sahu so-sahu requested a review from a team as a code owner February 23, 2024 07:26
@so-sahu so-sahu removed the request for review from a team February 23, 2024 07:28
@so-sahu so-sahu marked this pull request as draft February 23, 2024 07:28
@@ -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)
Copy link
Contributor

@lukas016 lukas016 Feb 23, 2024

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"`
Copy link
Contributor

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

@so-sahu so-sahu added the do-not-merge Do not merge !! label Feb 23, 2024
type ResourceName string

const (
ResourceCPU ResourceName = "cpu"
Copy link
Contributor

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"

@lukasfrank
Copy link
Member

Closing since not anymore relevant.

@lukasfrank lukasfrank closed this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define resource fields for api.Machine
3 participants