resource attributes for actions
- Dominant language
- Scala
- Stars
- 6.8k
- Forks
- 1.2k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 2
Description
## Use Case
Within an a heterogenous openwhisk cluster, where invokers consist of various hardware:
* action developers should be able to advertise resource requirements
* invokers should be able to advertise resource capabilities
* openwhisk operators should be able to control access to capabilities, and mapping to ContainerFactory impls
Consider that hardware varieties may include:
* gpu enabled
* faster/slower cpu
* faster/slower disk
* different OS (windows)
* regional resources
## Implementation touchpoints
### Action Developers
Could add annotations to actions:
`wsk action create --annotation gpu required`
`wsk action create --annotation cpu 22`
`wsk action create --annotation fast-disk required`
### Invokers+Controllers
Invokers/controllers could advertise supported attributes with value limits:
```
whisk.container-pool.attributes [
attribute {
name: gpu
values: "required"
}, attribute {
name: cpu
values: {range: [1,32]}
}, attribute {
name: region
values: ["ue1", "uw1", "ue2"]
}
]
```
To map action developer input to both:
* args needed on `docker run` commands
* context needed by ContainerFactory impls (to provision resources, or provide placement guidance, etc)
LoadBalancer may need to consider the ones that affect `which invoker` when scheduling Activation to Invoker
ContainerPool may need to consider the ones that affect `docker run` when scheduling Activation to Container.
For cluster-aware ContainerFactory impls, the ContainerFactory would presumably handle both.
Contributor guide
Assessment
This issue has not been assessed yet.