Add "resources" field to the computeClass definition
dciangot opened this issue · comments
Introducing the field resources to the ProjectComputeClassInstance and, as a consequence, to ClusterComputeClassInstance will enable cluster admins to add GPU and any custom hardware to the "offering" for the users.
Note from Darren: "One catch is that the resources can only be applied to the "main container" not any sidecars, as you really don't know which one to apply to."
Complete discussion ref on slack
Tested with acorn version - v0.10.0-rc2-9-g43dbcbf4+43dbcbf4
- Able to create a computeclass with
resources
field containingrequests
andlimits
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
- When deploying app using this compute class , I am able to see the pods having the resources set in the container spec as follows:
"resources": {
"limits": {
"gpu-vendor.example/example-gpu": "2",
"memory": "20M"
},
"requests": {
"cpu": "14m",
"gpu-vendor.example/example-gpu": "2",
"memory": "20M"
}
},
The app deployment itself fails in my case with following error since I dont have an environment that has nodes that support gpu which is as expected.
0/1 nodes are available: 1 Insufficient gpu-vendor.example/example-gpu. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod