Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for setting RuntimeClass in DevWorkspaces #789

Merged
merged 2 commits into from
Mar 3, 2022

Conversation

amisevsk
Copy link
Collaborator

@amisevsk amisevsk commented Mar 2, 2022

What does this PR do?

Add support for setting RuntimeClass for workspaces via attribute controller.devfile.io/runtime-class. The value of this attribute is propagated directly to pods in the workspace's deployment.

Internal documentation is updated to mention this attribute.

What issues does this PR fix or reference?

Closes #788
Part of eclipse-che/che#21105

Is it tested? How?

Create DevWorkspace

cat <<EOF | oc apply -f -
apiVersion: workspace.devfile.io/v1alpha2
kind: DevWorkspace
metadata:
  name: plain
spec:
  routingClass: basic
  started: true
  template:
    attributes:
      controller.devfile.io/storage-type: ephemeral
      controller.devfile.io/runtime-class: kata
    components:
    - container:
        command:
        - tail
        - -f
        - /dev/null
        image: quay.io/amisevsk/web-terminal-tooling:dev
        memoryLimit: 512Mi
        mountSources: true
      name: web-terminal
EOF

Workspace should fail to start immediately unless kata runtime is enabled in the cluster.

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

Add attribute 'controller.devfile.io/runtime-class` to enable setting
pods.spec.runtimeClassName on workspace pods. This allows e.g. using
kata containers for DevWorkspaces in clusters where they are enabled.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
@amisevsk amisevsk requested a review from l0rd March 2, 2022 18:21
@amisevsk amisevsk requested a review from ibuziuk as a code owner March 2, 2022 18:21
@openshift-ci openshift-ci bot added the approved label Mar 2, 2022
@amisevsk amisevsk changed the title Add support for setting RuntimeClass in DevWorkspaces feat: Add support for setting RuntimeClass in DevWorkspaces Mar 2, 2022
@amisevsk
Copy link
Collaborator Author

amisevsk commented Mar 2, 2022

/test v8-devworkspace-operator-e2e, v8-che-happy-path

@openshift-ci
Copy link

openshift-ci bot commented Mar 2, 2022

@amisevsk: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/v8-che-happy-path b62dadd link true /test v8-che-happy-path

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-ci openshift-ci bot added the lgtm label Mar 2, 2022
@openshift-ci
Copy link

openshift-ci bot commented Mar 2, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amisevsk, l0rd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@amisevsk amisevsk merged commit 8dd716b into devfile:main Mar 3, 2022
@amisevsk amisevsk deleted the runtime-class-name branch March 3, 2022 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support setting pod's runtimeClassName via DevWorkspace attribute
2 participants