Add runtimeClass support to modelmesh deployment #531
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows the deployment to use different container runtimes or configuration exposed by K8s runtimeClass.
Motivation
Many Kubernetes (K8s) clusters uses different container runtimes for security and isolation reasons. For example in some environment the pods will be executed using Kata containers runtime to take advantage of the additional isolation provided by Kata or to leverage confidential computing technologies.
Further, a cluster may have different configurations for the default container runtime. Kubernetes provides RuntimeClass to select a different container runtime or configuration.
ModelMesh currently doesn't provide native capability to execute the serving runtime pods using different container runtimes. This PR is to add relevant support in ModelMesh for K8s RuntimeClass to enable serving runtime pods to be executed using different container runtimes or configuration for the default container runtime.
Modifications
The modifications are in the config and modelmesh deployment transformation to add the runtimeClassName to the deployment spec.
Result
The model serving runtime deployments will be using the runtimeClassName configured in the configMap (
model-serving-config-defaults
)