Support parsing resource requirements in float instead of string for OCS
Why are we doing this work
We discovered that OCS is currently unable to parse float values when setting the CPU resource units
for OCS resource requirement configuration.
Kubernetes supports floating point definition of CPU resource units
and users expect that OCS resource requirement configuration should work the same.
Relevant links
How to replicate
- Configure OCS with CPU requests resource requirement as floating point value eg
4.2
- See that it throws an error like the one reported here.
- Update the config to
'4.2'
and see that the scan succeeds.
Implementation plan
- Update the parseAndValidateResourceRequirements method to be able to parse floating point values
- Revert Update OCS documentation with details to format... (!135448 - merged) to remove the need for user to format a float as a string
Edited by Shao Ming Tan