Skip to content

Support running a workspace in kata containers #21105

@l0rd

Description

@l0rd

Is your enhancement related to a problem? Please describe

Kata containers allow running pod in dedicated VMs. That makes it possible to run a container as root without any security exposure (and run apt-get/yum install or buildah).

To run a Che workspace in a kata container the workspace Pod should specify runtimeClassName: kata:

apiVersion: v1
kind: Pod
metadata:
  ...
spec:
  runtimeClassName: kata
  containers:
  ...

But that's not currently possible.

Describe the solution you'd like

To implement we should:

  1. Add spec.runtimeClassName field in DevWorkspace CRD that, if set and if the user has the necessary privileges, will be propagated to all the workspace Pods.
  2. Add a new Che URL parameter runtime-class-name: https://<che-host>#<repository_url>?<runtimeClassName>. If set the resulting DevWorkspace should include the runtimeClassName

Additional context

Here I have described how to setup an OpenShift cluster with kata containers and run buildah in it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/dashboardarea/devworkspace-operatorkind/enhancementA feature request - must adhere to the feature request template.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.severity/P1Has a major impact to usage or development of the system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions