Skip to content

Commit d0cf404

Browse files
weltekialexellis
authored andcommitted
Add docs for using gVisor with OpenFaaS Edge
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
1 parent 2caa5c7 commit d0cf404

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

docs/edge/gvisor.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# gVisor runtime
2+
3+
Improve container security with [gVisor](https://gvisor.dev/). The gVisor runsc runtime improves isolation between the Linux host and function containers so you can safely run untrusted code e.g. user-uploaded, LLM-generated, or third-party code.
4+
5+
OpenFaaS Edge supports using the gVisor runsc runtime for functions.
6+
If you are using OpenFaaS Pro on Kubernetes the runtime is supported via [Profiles](/reference/profiles/#use-an-alternative-runtimeclass).
7+
8+
## Installation
9+
10+
To start using gVisor with OpenFaaS Edge install runsc and the containerd runsc shim using the [gVisor installation docs](https://gvisor.dev/docs/user_guide/install/).
11+
12+
> Note: The containerd configuration does not need to be updated to use gVisor with OpenFaaS Edge.
13+
14+
### New OpenFaaS Edge installation
15+
16+
[Follow the installation instructions](/deployment/edge/#openfaas-edgefaasd-pro-commercial-use) to install OpenFaaS Edge. When you reach the step to run the `faasd install` command make sure to add the `--gvisor` flag:
17+
18+
```sh
19+
faasd install --gvisor
20+
```
21+
22+
### Change the runtime for an existing installation
23+
24+
When you want to change the runtime for an existing OpenFaaS Edge deployment run:
25+
26+
```sh
27+
faasd install --gvisor
28+
29+
systemctl daemon-reload
30+
systemctl restart faasd-provider
31+
```
32+
33+
Make sure to redeploy functions to switch them over to the new runtime.

docs/edge/overview.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Most of the [OpenFaaS Pro documentation](/docs/openfaas-pro/) and [Helm charts](
1313
* [Custom DNS servers](/edge/custom-dns)
1414
* [Kafka Connector for OpenFaaS Edge](/edge/kafka-deployment)
1515
* [GPU support for services](/edge/gpus)
16+
* [Improve container security with gVisor](/edge/gvisor)
1617

1718
## Looking for something else?
1819

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ nav:
181181
- Scale to Zero: ./edge/scale-to-zero.md
182182
- Kafka connector: ./edge/kafka-deployment.md
183183
- GPU for services: ./edge/gpus.md
184+
- gVisor: ./edge/gvisor.md
184185
- Reference:
185186
- OpenFaaS YAML: ./reference/yaml.md
186187
- REST API: ./reference/rest-api.md

0 commit comments

Comments
 (0)