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

Allow to specify arbitrary fields of the workspace Pod and containers using a Devfile #852

Closed
l0rd opened this issue Jun 2, 2022 · 2 comments · Fixed by #944
Closed
Assignees
Labels
new&noteworthy For new and/or noteworthy issues
Milestone

Comments

@l0rd
Copy link
Collaborator

l0rd commented Jun 2, 2022

Description

There are a few examples of workspaces Pods annotations (openshift.io/scc or runtimeClassName) or Pods spec fields (runtimeClassName, schedulerName) that users want to be able to specify.

The approach until now has been to use spec.template.attributes. But that requires code/spec changes for every new field/annotation that we want to support. To avoid that, and allow users to set arbitrary Pods fields, we could add a DevWorspace.spec.pods field for that:

kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
  name: myspacework
spec:
  started: true
+  pods:
+    metadata:
+      annotations:
+        io.openshift.userns: "true"
+        io.kubernetes.cri-o.userns-mode: "auto:size=65536;map-to-root=true"  # <-- user namespace
+        openshift.io/scc: container-build
+    spec:
+      runtimeClassName: kata
+      schedulerName: stork      
  template:
  (...)

Additional context

Release Notes Text

Using a Devfile in the git repository, a developer can override any workspace Pod and containers fields. This includes runtimeClassName, schedulerName and kubernetes extended resources such as nvidia.com/gpu.

@amisevsk
Copy link
Collaborator

amisevsk commented Jun 3, 2022

Opened Devfile API issue: devfile/api#860

@ibuziuk ibuziuk mentioned this issue Jun 27, 2022
68 tasks
@ibuziuk ibuziuk mentioned this issue Jul 19, 2022
51 tasks
@ibuziuk ibuziuk mentioned this issue Aug 9, 2022
67 tasks
@ibuziuk ibuziuk mentioned this issue Aug 30, 2022
82 tasks
@l0rd l0rd changed the title Allow to specify arbitrary pods fields Allow to specify arbitrary fields of the workspace Pod and containers using a Devfile Oct 20, 2022
@l0rd l0rd added the new&noteworthy For new and/or noteworthy issues label Oct 27, 2022
@amisevsk amisevsk added this to the v0.17.x milestone Dec 12, 2022
@max-cx
Copy link

max-cx commented Dec 14, 2022

Sync'd with Red Hat JIRA https://issues.redhat.com/browse/CRW-3626

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment