You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The runtime-class-manager is the spiritual successor to the kwasm-operator. kwasm has been developed as an experimental, simple way to install Wasm runtimes. This experiment has been relatively successful, as more and more users utilized it to fiddle around with Wasm on Kubernetes. However, the kwasm-operator has some limitations that make it difficult to use in production. The runtime-class-manager is an attempt to address these limitations to make it a reliable and secure way to deploy arbitrary containerd shims.
5
+
## Overview
6
6
7
-
The implementation of runtime-class-manager follows [this](https://hackmd.io/TwC8Fc8wTCKdoWlgNOqTgA) community proposal.
7
+
Runtime Class Manager is Kubernetes Operator that assists with [Wasm](https://webassembly.org/)runtime installation and configuration on a Kubernetes cluster. It does so by handling creation and installation of [RuntimeClasses](./docs/runtimeclass.md) and [containerd](https://containerd.io/) shim binaries for each [Shim](./docs/shim.md) custom resource created on a cluster.
8
8
9
-
The name should be treated as a working title and is hopefully subject to change.
9
+
## Background
10
+
11
+
The Runtime Class Manager is the spiritual successor to the kwasm-operator. kwasm has been developed as an experimental, simple way to install Wasm runtimes. This experiment has been relatively successful, as more and more users utilized it to fiddle around with Wasm on Kubernetes. However, the kwasm-operator has some limitations that make it difficult to use in production. The Runtime Class Manager is an attempt to address these limitations to make it a reliable and secure way to deploy arbitrary containerd shims.
12
+
13
+
The implementation of Runtime Class Manager follows [this](https://hackmd.io/TwC8Fc8wTCKdoWlgNOqTgA) community proposal.
10
14
11
15
## Roadmap
12
16
13
-
For the 1.0 release of runtime-class-manager, we consider three milestones:
17
+
For the 1.0 release of Runtime Class Manager, we consider three milestones:
14
18
15
19
-**M1: [RCM MVP for Spinkube](https://github.com/spinframework/runtime-class-manager/milestone/1)**
16
-
This milestone is about getting RCM to a state where Spinkube can rely on RCM and use it as a dependency instead of Kwasm. This means, that the focus is on managing lifecycle of [containerd-shim-spin](https://github.com/spinframework/containerd-shim-spin) on nodes.
20
+
This milestone is about getting RCM to a state where Spinkube can rely on RCM and use it as a dependency instead of Kwasm. This means, that the focus is on managing lifecycle of [containerd-shim-spin](https://github.com/spinframework/containerd-shim-spin) on nodes._This is now complete._
All shims that kwasm can install, should be installable via rcm. Automated tests are in place to ensure installation of RCM and shims that are supported by Kwasm.
19
23
-**M3: [Full implementation of the initial spec](https://github.com/spinframework/runtime-class-manager/milestone/3)**
@@ -23,7 +27,7 @@ Stable spec of the Shim CRD based on the [initial proposal](https://hackmd.io/Tw
23
27
- alternative shim installation via Daemonset instead of Jobs
24
28
- treating node-installer as a daemon process, to enable better conflict resolution
The Operator is designed to create a RuntimeClass for each shim. `spec.runtimeClass` configures the RuntimeClass that will be created.
3
+
Runtime Class Manager is in charge of creating a [RuntimeClass](https://kubernetes.io/docs/concepts/containers/runtime-class) for each [Shim](./shim.md) resource created on the cluster.
4
+
5
+
The `spec.runtimeClass` section of the Shim resource configures the RuntimeClass that will be created.
4
6
5
7
*`spec.runtimeClass.name`: Name of the Kubernetes RuntimeClass
8
+
- This name should match what is expected by shim-specific operator(s) on the cluster
9
+
- For example, the [Spin Operator](https://github.com/spinframework/spin-operator) utilizes a [SpinAppExecutor](https://www.spinkube.dev/docs/reference/spin-app-executor/) resource
10
+
to run Spin Apps; the default RuntimeClass name it expects can be seen [here](https://github.com/spinframework/spin-operator/blob/main/config/samples/spin-shim-executor.yaml)
6
11
*`spec.runtimeClass.handler`: Name of the shim as it is referenced in the containerd config
7
12
8
-
**Discuss later:**
9
-
10
-
- At this point in time `spec.RuntimeClass` is a mendatory field
11
-
- pro: it will make sure a RuntimeClass exist for the shim thats going to be installed
12
-
- con: possible that runtimeclass is created by other means
13
-
- Should `spec.RuntimeClass.handler` be optional? Is it even required?
13
+
> Note: The RuntimeClass's `scheduling.nodeSelector` will be set to the same key/value pair as configured in the [Shim](./shim.md) resource. This ensures that applications targeting the RuntimeClass are only scheduled on nodes where the corresponding runtime shim has been installed.
Runtime Class Manager operates on `Shim` custom resources based on the [Shim CRD](../config/crd/bases/runtime.spinkube.dev_shims.yaml).
4
+
5
+
Whenever a Shim is created, updated or deleted, Runtime-Class-Manager will perform the necessary actions, e.g. creating, updating or removing the associated [RuntimeClass](./runtimeclass.md), installing or removing shim binaries on any [Nodes](https://kubernetes.io/docs/concepts/architecture/nodes/) labeled with a corresponding to its `nodeSelector`, etc.
6
+
7
+
### Configuration
8
+
9
+
For full, detailed configuration options, see the [Shim CRD](../config/crd/bases/runtime.spinkube.dev_shims.yaml). Here we point out a few pertinent items.
10
+
11
+
*`spec.nodeSelector`: The label key and value applied to Nodes where this particular shim should be installed
12
+
*`spec.fetchStrategy`: The strategy for fetching the shim binary
13
+
*`spec.fetchStrategy.type`: `anonymousHttp` is the only option currently supported.
14
+
*`spec.fetchStrategy.anonHttp.location`: The URL where the shim binary can be downloaded
15
+
*`spec.containerdRuntimeOptions`: Options specific to the shim that should be added to the containerd configuration
16
+
17
+
### Operation
18
+
19
+
You may observe the "install" and "uninstall" [Jobs](https://kubernetes.io/docs/concepts/workloads/controllers/job/) responsible for downloading and installing (or uninstalling) the shim binary. These will run on every Node that matches the Shim's `nodeSelector`.
0 commit comments