Skip to content

quantityToScalar does not support all of the SI suffixes #653

Closed
@zephyrxvxx7

Description

@zephyrxvxx7

Describe the bug
In the file src/utils.ts, the function quantityToScalar does not support all of the Kubernetes canonical quantity.
It just supports "m" and "Ki" SI suffixes.

Client Version
0.14.3

Server Version
1.19.3

Expected behavior
Support all of the Kubernetes canonical quantity:
base1024: Ki | Mi | Gi | Ti | Pi | Ei
base1000: n | u | m | "" | k | M | G | T | P | E

Environment (please complete the following information):

  • OS: macOS
  • NodeJS Version v16.0.0

Additional context
The official repo apimachinery have more detail about it.

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions