Instance Types
An instance type is a preset that defines resources (CPU, memory, etc.) and a computing platform (e.g., a Kubernetes cluster) for allocating dev environments. For example, you can create a small
instance type with 4 CPUs and 16 GB of memory, a medium
instance type with 6 CPUs and 32 GB of memory, and so on. Namespace administrators can choose one of the available instance types for their dev environment template.
The Administration | Instance Types page lets you create, edit, and delete instance types. Here, you can also find a specific instance type by its ID or name or filter instance types by the computing platform.
To create an instance type
Select Administration in the header navigation, then in the sidebar menu, select Instance Types.
Click New instance type.
Specify the instance type Name and other settings:
Computing platform – connection to a computing platform (e.g., a Kubernetes cluster) where dev environments should be started.
CPU, Memory, and Volume – the resources allocated for a dev environment.
Volume storage class – each dev environment has an associated K8s volume with dev environment data. Here you can specify your custom StorageClass that defines such volumes and CodeCanvas will use them instead of the default one. If you use AWS EBS volumes, we recommend io2-based volumes for the best possible performance.
Volume snapshot class – during the warm-up, CodeCanvas creates a snapshot of a dev environment file system with project indexes, dependencies, etc. Here you can specify your custom VolumeSnapshotClass that defines such volumes, and CodeCanvas will use them instead of the default one.
Scope – specify in which namespaces this instance type should be available: in All namespaces or only in Specific namespaces.
Pod template YAML – the YAML file that describes the pod template for the worker pod. Customize this template to make worker pods better meet the requirements of your infrastructure. CodeCanvas will automatically add all required labels, annotations, environment variables, and volumes that are necessary for the pods to function correctly. Therefore, all you need is to add your custom configuration to the pod template.
The template you provide here overrides the pod template used by the selected Computing platform. Use this feature to create unique instance types within the same computing platform, e.g., instance types with different GPU configurations or worker container images.
Click Save.