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

HRQ decimal point value cannot be specified #292

@mochizuki875

Description

@mochizuki875

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions