Skip to content

Commit 7f0ba8e

Browse files
authored
Merge pull request #563 from vdice/docs/misc-updates
docs(*): misc updates
2 parents 6ab76c0 + 2158972 commit 7f0ba8e

5 files changed

Lines changed: 38 additions & 25 deletions

File tree

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
# runtime-class-manager
1+
# Runtime Class Manager
22

33
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/spinframework/runtime-class-manager/badge)](https://securityscorecards.dev/viewer/?uri=github.com/spinframework/runtime-class-manager)
44

5-
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
66

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.
88

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.
1014

1115
## Roadmap
1216

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:
1418

1519
- **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._
1721
- **M2: [Kwasm Feature Parity](https://github.com/spinframework/runtime-class-manager/milestone/2)**
1822
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.
1923
- **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
2327
- alternative shim installation via Daemonset instead of Jobs
2428
- treating node-installer as a daemon process, to enable better conflict resolution
2529

26-
## Usage
30+
## Development
2731

2832
### To Deploy on the cluster
2933

docs/runtimeclass.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
## RuntimeClass
22

3-
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.
46

57
* `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)
611
* `spec.runtimeClass.handler`: Name of the shim as it is referenced in the containerd config
712

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.

docs/shim.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Shim
2+
3+
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`.

docs/shim_delete.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/supported_distros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ We support the same Kubernetes distributions as Kwasm.
66
|---------------------|------|------------------|----------------|----------------|--------------------------|-----------------|----------------------|----------|--------------------|
77
| WasmEdge ||| (✅) | (✅) ||||||
88
| Wasmtime ||| (✅) | (✅) ||||||
9-
| Fermion Spin ||| (✅) | (✅) ||||||
9+
| Spin ||| (✅) | (✅) ||||||
1010
| Wasm Workers Server ||| (✅) | (✅) ||||||
1111
| Lunatic ||| (✅) | (✅) ||||||
1212
| Slight ||| (✅) | (✅) ||||||

0 commit comments

Comments
 (0)