-
Couldn't load subscription status.
- Fork 101
Convert Ephemeral-Storage in MaxNodePoolResources from Bytes to GB #566
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
base: main
Are you sure you want to change the base?
Conversation
…g and converting memory from Bytes to GB.
…to bugfix/fix-issue400
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.
Looks good over all,
Please run make validate && make test to make sure that all the check pass - I see that currently the linter fails.
|
|
||
| for rName, rQuant := range r.scalarResources { | ||
| messageBuilder.WriteString(fmt.Sprintf(", %s: %v", rName, rQuant)) | ||
| messageBuilder.WriteString(fmt.Sprintf(", %s: %v", rName, rQuant)) |
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 will cause the linter to file
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, I have one final request
| for rName, rQuant := range r.scalarResources { | ||
| messageBuilder.WriteString(fmt.Sprintf(", %s: %v", rName, rQuant)) | ||
| if rName == v1.ResourceEphemeralStorage || rName == v1.ResourceStorage { | ||
| rQuant = rQuant / (1000 * 1000 * 1000) // convert from milli-bytes to GB |
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.
| rQuant = rQuant / (1000 * 1000 * 1000) // convert from milli-bytes to GB | |
| rQuant = rQuant / (MemoryToGB) // convert from milli-bytes to GB |
Added test case for ephemeral storage testing. Made changes in reading and converting memory from Bytes to GB.