feat: add docs for runtime-class-name feature (#6022)

adds docs for configuring runtime-class-name
This commit is contained in:
Caleb Woodbine 2024-06-28 06:16:37 +12:00 committed by GitHub
parent 1ec7a2b880
commit f146f87ed2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 44 additions and 0 deletions

View File

@ -133,3 +133,47 @@ data:
# List of repositories for which tag to digest resolving should be skipped
registries-skipping-tag-resolving: registry.example.com
```
## Configuring selectable RuntimeClassName
You can configure Knative Serving to configure deployments with a specified RuntimeClassName (`Pod.Spec.RuntimeClassName`) by modifying the `runtime-class-name` setting.
The setting works with Service labels and will configure either a default or one where the most labels match.
**Example:**
=== "Global (ConfigMap)"
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: config-deployment
namespace: knative-serving
data:
runtime-class-name: |
kata: {}
gvisor:
selector:
my-label: selector
```
=== "Operator"
```yaml
apiVersion: operator.knative.dev/v1beta1
kind: KnativeServing
metadata:
name: knative-serving
namespace: knative-serving
spec:
config:
deployment:
runtime-class-name: |
kata: {}
gvisor:
selector:
my-label: selector
```
See [Kubernetes RuntimeClass](https://kubernetes.io/docs/concepts/containers/runtime-class/) docs for more information.
Separately, there is a feature flag to allow [manual configuration of RuntimeClassName](/docs/serving/configuration/feature-flags/#kubernetes-runtime-class).