This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Description
What happened?
In HierarchicalResourceQuota, decimal point value cannot be specified.
It's allowed in ResourceQuota.
What did you expect to happen?
Decimal point value can be specified as ResourceQuota
How can we reproduce it (as minimally and precisely as possible)?
For example, this will be invalid.
test-hrq.yaml
apiVersion: hnc.x-k8s.io/v1alpha2
kind: HierarchicalResourceQuota
metadata:
name: test-hrq
namespace: test
spec:
hard:
limits.cpu: 1.5 # invalid
limits.memory: 500Mi
requests.cpu: 1
requests.memory: 200Mi
$ kubectl apply -f test-hrq.yaml
The HierarchicalResourceQuota "test-hrq" is invalid:
* spec.hard.limits.cpu: Invalid value: "number": spec.hard.limits.cpu in body must be of type integer,string: "number"
* <nil>: Invalid value: "": "spec.hard.limits.cpu" must validate at least one schema (anyOf)
* spec.hard.limits.cpu: Invalid value: "number": spec.hard.limits.cpu in body must be of type integer: "number"
If set limits.cpu: "1.5", it works.