Runtime classes
A runtime class registers a handler name on the Controller, such as a WASM shim. Attach it to Edgelet nodes. A microservice then sets container.runtime to that handler.
Fields are on RuntimeClass fields. Installing shim binaries is host setup. See Container engines.
This object uses the fleet apiVersion. An Edgelet install manifest uses edgelet.iofog.org/v1 and edgelet deploy. Those are different documents.
When to use it
Use a runtime class when a microservice must run on a handler other than the default OCI runtime. The handler string must match a runtime already installed on the Edgelet node. Deploying the class does not copy shim binaries.
Attach works on Edgelet nodes. A non-Edgelet target returns 400. The CLI prefixes that error with cannot attach runtimeclass: RuntimeClass can only be linked to edgelet agents.
What deploy does
potctl deploy -f runtimeclass.yaml -n my-ecn
handler sits at the document root, beside metadata. Deploy upserts by metadata.name. The same name updates the handler string. A handler change on a linked node can affect running microservices.
apiVersion: datasance.com/v3
kind: RuntimeClass
metadata:
name: wasmtime
namespace: my-ecn
handler: wasmtime
How a microservice uses it
Attach the runtime class, then set container.runtime to the handler. container.platform is the OCI platform, such as wasi/wasm. See Microservice fields.
apiVersion: datasance.com/v3
kind: Microservice
metadata:
name: line-monitor/reader
spec:
container:
runtime: wasmtime
CLI
potctl get runtimeclass -n my-ecn
potctl describe runtimeclass wasmtime -n my-ecn
potctl attach runtimeclass wasmtime edge-01 -n my-ecn
potctl detach runtimeclass wasmtime edge-01 -n my-ecn
potctl delete runtimeclass wasmtime -n my-ecn
describe runtimeclass lists status.linkedAgents. attach runtimeclass and detach runtimeclass take the class name and Edgelet node names. Confirm availableRuntimes, runtimeClasses, and runtimeAgentPhase with describe agent. Detach before delete when the Controller still has links. A 409 body can list blocking microservice UUIDs.
Console
Config → Runtime Classes manages fleet handlers. See Configuration.