Closed cloudnautique closed 10 months ago
@cloudnautique can you give a practicall example here? I understand this is related to the kata POC. But can you:
@cjellick I added an update to the docs, which shows a project compute class YAML. I think that satisfies the compute class yaml request. Please let me know if it doesn't and I can update the docs some more.
The field is set to the string name of a k8s RuntimeClass
, an example YAML for one is:
apiVersion: node.k8s.io/v1
handler: kata-clh
kind: RuntimeClass
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"node.k8s.io/v1","handler":"kata-clh","kind":"RuntimeClass","metadata":{"annotations":{},"name":"kata-clh"},"overhead":{"podFixed":{"cpu":"250m","memory":"130Mi"}},"scheduling":{"nodeSelector":{"katacontainers.io/kata-runtime":"true"}}}
creationTimestamp: "2023-11-21T17:54:07Z"
name: kata-clh
resourceVersion: "20424"
uid: 85d1fdde-834d-4476-adb9-456b74d8e209
overhead:
podFixed:
cpu: 250m
memory: 130Mi
scheduling:
nodeSelector:
katacontainers.io/kata-runtime: "true"
The RuntimeClass is set as a field on a K8s pod spec, when this is specified on the compute class a deployment will have it set like:
apiVersion: apps/v1
kind: Deployment
metadata:
...
spec:
containers:
...
image: ghcr.io/cloudnautique/acorn-minecraft@sha256:fd92271de53157c76cfed9bc7e7bbef5c60b829e76afd7b50612f5cd8e607de9
...
runtimeClassName: kata-clh
...
Runtime classes are added as in internal value on Acorn compute class objects. This allows for using things like Kata Containers.