Issues with computeclass created with resource limit/request.
Closed this issue · 1 comments
sangee2004 commented
acorn version - v0.10.0-rc2+e32a2709
Steps to reproduce the problem:
- Try to create a
ClusterComputeClassInstance
with resource limit/request set to integer values.
kind: ClusterComputeClassInstance
apiVersion: internal.admin.acorn.io/v1
default: true
metadata:
name: cc1
description: Large compute for linux on arm64
cpuScaler: 0.75
supportedRegions:
- local
memory:
default: 20M
min: 10M
max: 100M
runtimeClassName: mytestclass
resources:
limits:
gpu-vendor.example/example-gpu: 2
test2: 2
requests:
gpu-vendor.example/example-gpu: 1
test2: 1
- This fails with following errors:
kubectl apply -f ccnew.yaml
The ClusterComputeClassInstance "cc1" is invalid:
* resources.limits.gpu-vendor.example/example-gpu: Invalid value: "integer": resources.limits.gpu-vendor.example/example-gpu in body must be of type string: "integer"
* resources.limits.test2: Invalid value: "integer": resources.limits.test2 in body must be of type string: "integer"
* resources.requests.gpu-vendor.example/example-gpu: Invalid value: "integer": resources.requests.gpu-vendor.example/example-gpu in body must be of type string: "integer"
* resources.requests.test2: Invalid value: "integer": resources.requests.test2 in body must be of type string: "integer"
- Try to create a
ClusterComputeClassInstance
with resource limit/request set to string. This succeeds. But app deployment using this computeclass fails with following error
✗ ERROR: App.api.acorn.io "mytest" is invalid: spec.image: Invalid value: "2601fcb549cec80e17651e1eb9163a7dead87dd7ec344e9e569e2a95e6410763": error listing compute classes: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
Same error is also seen when listing computeclass
acorn offerings computeclass
✗ ERROR: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
sangee2004 commented
Tested with acorn version - v0.10.0-rc2-9-g43dbcbf4+43dbcbf4
- Able to create a computeclass with resources field containing requests and limits using following yaml :
kind: ClusterComputeClass
apiVersion: admin.acorn.io/v1
default: false
metadata:
name: cc-res
description: Large compute for linux on arm64
cpuScaler: 0.75
supportedRegions:
- local
memory:
default: 20M
min: 10M
max: 100M
resources:
limits:
gpu-vendor.example/example-gpu: 2
requests:
gpu-vendor.example/example-gpu: 2
- Able to list this computeclass using
acorn offerings computeclass
and deploy apps using this computeclass.