Templates
Templates describe what workspaces run. They are written in the template language by members of any team and published only once someone with template:review has approved them, so that nothing runs in the cluster that nobody has read.
Reviewing
The Templates page has a Review tab for holders of template:review (the built-in template_reviewer and admin roles). It lists the templates with a submitted revision. For each one it shows the document, its problems and its difference to the published revision.
- Approve publishes the revision. A reviewer cannot approve a revision they wrote; another reviewer does, or someone with
template:manage. New workspaces are created from it, and existing ones pick it up at their next start. - Reject needs a note telling the author why. The author's next edit starts a new draft.
What to look for: the image and where it comes from, command and args, public endpoints (served without the platform's sign-in), the runtime, and resource defaults that would exhaust users' quotas.
A submitted revision never changes. If the author withdraws it, it stays withdrawn; an approval therefore always covers the exact document the reviewer read. Approval and rejection are in the audit log as template.approve and template.reject, with the note.
Sharing
A template belongs to the team it was written in and only that team's members see and use it. A reviewer can share it with everyone (visibility: public) on its page or with PATCH /v1/templates/{id}; making it private again needs only write access to it.
Disabling a template hides it from everyone outside its team and stops new workspaces from it; existing workspaces keep running with their copy. Deleting it keeps existing workspaces too. Templates of a deleted team are deleted with it.
Device classes and runtimes
GPUs, NPUs and runtimes are offered in the worker settings section, and per worker in its overrides. Templates name them; nothing else reaches the pod. A template may name what at least one active worker offers, and its workspaces are placed on a worker that offers all of it.
worker:
accelerators:
- name: nvidia # what templates write as resources.accelerator.class
title: NVIDIA GPU # shown to users
resource: nvidia.com/gpu
runtime_class: nvidia # optional, for clusters where GPUs need a RuntimeClass
- name: ascend-910b
title: Ascend 910B
resource: huawei.com/Ascend910
node_selector: {accelerator: ascend-910b}
tolerations:
- {key: huawei.com/Ascend910, operator: Exists, effect: NoSchedule}
runtimes: [kata]
| Field | Meaning |
|---|---|
accelerators[].name | Lower-case DNS label templates refer to. |
accelerators[].resource | Extended resource the device plugin advertises. |
accelerators[].runtime_class | RuntimeClass the devices need. A template's own runtime takes precedence. |
accelerators[].node_selector, tolerations | Merged into the pod, to land on the nodes that have the devices. |
runtimes | RuntimeClasses templates may name in runtime. |
The default offers one class, nvidia, on nvidia.com/gpu, and no runtime. A template naming a class or runtime that is not offered cannot be saved or approved. Removing one later stops workspaces that use it from starting, with the code template_unoffered; running ones keep running.
A class is also a tier: it has its own price and may have its own quota, on top of the gpu total every device counts against. A template can offer several classes and let users choose.
Example templates
The editor offers ready-made templates for the idekube-container images, pinned to a release: VS Code, JupyterLab, a Linux desktop, an AI-agent shell and PyTorch on a GPU. They are a starting point; an administrator usually publishes a few of them to everyone right after installation.