-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat(overcommit):add nodeOvercommitConfig crd #34
feat(overcommit):add nodeOvercommitConfig crd #34
Conversation
// ResourceOvercommitRatioConfig describes the resource overcommit ratio that needs to inject into Node.Annotations | ||
// cpu,memory are supported. | ||
// +optional | ||
ResourceOvercommitRatioConfig map[v1.ResourceName]string `json:"resourceOvercommitRatioConfig,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.
why not use a slice of custom defined structure with resource name as a field instead of map, because the scalebility of map is poor, and k8s also suggest using list instead of map https://github.com/kubernetes/kubernetes/issues/2004#issuecomment-60641437
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.
why not use a slice of custom defined structure with resource name as a field instead of map, because the scalebility of map is poor, and k8s also suggest using list instead of map https://github.com/kubernetes/kubernetes/issues/2004#issuecomment-60641437
thanks for the suggestion. The scalebility is pool that each resource only has a string value. I'll update it accroding to the suggestion.
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.
@luomingmeng I thought about it, maybe "ResourceOvercommitRatio" is more like "ResourceList" in container Resources, also we need a map to ensure the uniqueness of the resources. What do you think?
Do you have any suggestions? @caohe
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.
If the field is similar to ResourceList
, it is better to use the name ResourceOvercommitRatio
directly, rather than using ResourceOvercommitRatioConfig
.
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.
done, ResourceOvercommitRatioConfig is renamed to ResourceOvercommitRatio.
07b4e80
to
d99092c
Compare
What type of PR is this?
Features
What this PR does / why we need it: