-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support extended resources and ephemeral-storage for scale-from-zero specified in MachineClass NodeTemplate #334
base: machine-controller-manager-provider
Are you sure you want to change the base?
Conversation
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.
Thanks for the PR. some changes requested.
capacityAttributes := []v1.ResourceName{"cpu", "gpu", "memory"} | ||
|
||
for _, attribute := range capacityAttributes { | ||
for _, attribute := range coreResourceNames { |
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.
FYI - With this GPU is not considered a core resource.
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.
Yes, this was stupid oversight. I have gpuResourceNames
but it makes more correct to have gpu
inside coreReourceNames
. To be honest in the real world Node
we seem to be using only nvidia GPU's labels.
|
||
func filterExtendedResources(allResources v1.ResourceList) (extendedResources v1.ResourceList) { | ||
extendedResources = make(v1.ResourceList) | ||
for _, n := range knownResourceNames { |
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.
Aren't we just filtering the knownResourceNames
in this? What if I have some other extended resource which is not part of this list? I think in general that would be the case
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.
We are the removing the knownResources
and keeping all other extended resources in this function. Will add a doc and unit-test to make this clear.
Corrected issues. Will test scale from zero for ephemeral storage and custom resources and add manual test-log tomorrow. I am unsure how to code an integration test for this though. |
What this PR does / why we need it:
Right now in scale-from-zero cases, the autoscaler does not respect ephemeral-storage and extended resource specified in the
MachineClass.NodeTemplate
. Only the standardcpu
,gpu
andmemory
are picked up. Neither is there any support for custom extended resource which are fully ignored presently.Which issue(s) this PR fixes:
Fixes #132
Special notes for your reviewer:
Release note: