fix(gpu): refuse an explicit zero GPU count in gpus entries

A count of 0 was read as "unset" and silently became 1, so a tenant
who wrote 0 got a GPU they did not ask for; a negative count already
failed to render. Only a missing or null count now selects the default
of 1. Any other value must be a whole number of at least 1, and a
raw-name entry accepts no count at all.

count has not been in any release yet, so no stored object depends on
the old 0 to 1 behaviour. A release carrying count 0 recovers once the
count is removed or set to at least 1.

The count descriptions now state the accepted range.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
Aleksei Sviridkin committed 2026-11-28 09:25:44 +03:00
1 parent d409dc7a4c
commit bbac0a7b24
13 files changed
+107 -16

No files matched your search

+1 -1
View File
@@ -107,7 +107,7 @@ type ConfigSpec struct {
type GPU struct {
// GPUClass to take GPUs of.
ClassName string `json:"className,omitempty"`
// GPUs of the class per worker; 1 when unset.
// For class entries, a whole number of at least 1 GPUs per worker; omit count to use 1. All class entries of one worker together may not exceed 1024 GPUs. Raw-name entries must omit count.
Count int `json:"count,omitempty"`
// Name of GPU, such as "nvidia.com/AD102GL_L40S".
Name string `json:"name,omitempty"`
+1 -1
View File
@@ -104,7 +104,7 @@ type Firmware struct {
type GPU struct {
// GPUClass to take GPUs of.
ClassName string `json:"className,omitempty"`
// GPUs of the class; 1 when unset.
// For class entries, a whole number of at least 1; omit count to use 1. All class entries of one VM together may not exceed 1024 GPUs. Raw-name entries must omit count.
Count int `json:"count,omitempty"`
// Resource name of the GPU to request directly.
Name string `json:"name,omitempty"`
+1 -1
View File
@@ -48,7 +48,7 @@ The pool's Kubernetes minor (`version`) may lag the cluster's during an upgrade
| `gpus` | List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM). | `[]object` | `[]` |
| `gpus[i].name` | Name of GPU, such as "nvidia.com/AD102GL_L40S". | `string` | `""` |
| `gpus[i].className` | GPUClass to take GPUs of. | `string` | `""` |
| `gpus[i].count` | GPUs of the class per worker; 1 when unset. | `int` | `0` |
| `gpus[i].count` | For class entries, a whole number of at least 1 GPUs per worker; omit count to use 1. All class entries of one worker together may not exceed 1024 GPUs. Raw-name entries must omit count. | `int` | `0` |
| `maxUnavailable` | Workers a rollout (instance type, image or version change) may remove before their replacement is up. Unset, it is 0, so each replacement joins before an old worker is drained, and 1 on a pool with `gpus`, whose replacement may need the very GPU the old worker holds. With 0, a rollout needs room for one extra VM: a pool short of quota or capacity for it stalls, with the new Machine Pending, until room is made or `maxUnavailable` is set to 1. Set 1 on a Proxmox pool whose template passes a GPU through: the chart cannot see that GPU, and with 0 the rollout would wait for it forever. | `*int` | `null` |
| `kernelModules` | Kernel modules loaded on every worker in this pool, emitted as Talos `machine.kernel.modules`. A Talos system extension installs a module but does not load it, so an extension-provided driver needs its modules declared here. Leave unset to let the chart decide: a pool holding at least one `nvidia.com/*` GPU gets `nvidia` (with `NVreg_NvLinkDisable=1`, which the gpu-operator driver container applies on non-Talos workers; on Talos that container has to be turned off or it clashes with the system extension, and nothing then mounts the ConfigMap carrying the parameter), `nvidia_uvm`, `nvidia_drm`, `nvidia_modeset` (that order — Talos loads the list in sequence and the last three depend on the first), and any other pool gets nothing. Set a non-empty list to replace the chart's choice entirely, or `[]` to opt out and emit no modules even on a GPU pool. The field carries no default, and unset is not the same value as `[]`: a generated parameter table that shows `[]` in its Default column is printing what it prints for any array with no default, not the effective value — leaving the field out selects the automatic set, writing `[]` disables it. The module still has to be in the image, and which extensions the image carries is the pool's schematic: a GPU pool points `osImage.factory.schematicID` (or `osImage.builtin.schematicID`) at a schematic with the NVIDIA extensions, and on Blackwell (GB202) that must be the open-kernel-modules extension. For raw name entries the automatic set keys on the `nvidia.com/` resource prefix; for class entries it reads the class's immutable `vendor` and loads the NVIDIA modules when it is `nvidia`. Nothing cross-checks the modules against that schematic; on Talos v1.13 a declared module the image does not ship leaves its controller retrying rather than failing the boot, so the symptom is a missing driver, not a dead node. This value is part of the worker machine config, whose content hash names the `TalosConfigTemplate`, so changing it rolls every existing worker in the pool rather than only affecting nodes created later. | `[]object` | `[]` |
| `kernelModules[i].name` | Module name as `modprobe` takes it, e.g. `nvidia_uvm`. | `string` | `""` |
@@ -101,6 +101,62 @@ tests:
- notExists:
path: spec.template.spec.virtualMachineTemplate.spec.template.metadata.labels["cozystack.io/gpu-reference"]
- it: refuses an explicit zero class count
kubernetesProvider: *gpuClassProvider
template: templates/nodegroup.yaml
set:
gpus:
- className: h100
count: 0
asserts:
- failedTemplate:
errorPattern: "gpus\\[0\\].count must be a whole number of at least 1"
- it: refuses a negative class count
kubernetesProvider: *gpuClassProvider
template: templates/nodegroup.yaml
set:
gpus:
- className: h100
count: -1
asserts:
- failedTemplate:
errorPattern: "gpus\\[0\\].count must be a whole number of at least 1"
- it: refuses an explicit zero raw count
template: templates/nodegroup.yaml
set:
gpus:
- name: example.com/gpu
count: 0
asserts:
- failedTemplate:
errorPattern: "gpus\\[0\\]: count applies to className entries only"
- it: refuses a negative raw count
template: templates/nodegroup.yaml
set:
gpus:
- name: example.com/gpu
count: -1
asserts:
- failedTemplate:
errorPattern: "gpus\\[0\\]: count applies to className entries only"
- it: defaults an omitted class count
template: templates/nodegroup.yaml
kubernetesProvider: *gpuClassProvider
set:
gpus:
- className: h100
documentSelector:
path: kind
value: KubevirtMachineTemplate
asserts:
- equal:
path: spec.template.spec.virtualMachineTemplate.spec.template.metadata.annotations["cozystack.io/gpus"]
value: '[{"className":"h100","count":1}]'
- it: refuses class entries where GPUs do not serve VMs
kubernetesProvider: *gpuClassProvider
template: templates/nodegroup.yaml
@@ -161,7 +161,7 @@
}
},
"count": {
"description": "GPUs of the class per worker; 1 when unset.",
"description": "For class entries, a whole number of at least 1 GPUs per worker; omit count to use 1. All class entries of one worker together may not exceed 1024 GPUs. Raw-name entries must omit count.",
"type": "integer"
},
"name": {
+1 -1
View File
@@ -53,7 +53,7 @@ storageClass: replicated
## @x-cozystack-options {source: gpu}
## @field {string} [className] - GPUClass to take GPUs of.
## @x-cozystack-options {source: gpuclass}
## @field {int} [count] - GPUs of the class per worker; 1 when unset.
## @field {int} [count] - For class entries, a whole number of at least 1 GPUs per worker; omit count to use 1. All class entries of one worker together may not exceed 1024 GPUs. Raw-name entries must omit count.
## @typedef {struct} KernelModule - Kernel module loaded on the worker at boot.
## @field {string} name - Module name as `modprobe` takes it, e.g. `nvidia_uvm`.
+1 -1
View File
@@ -57,7 +57,7 @@ virtctl ssh <user>@<vm>
| `gpus` | List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM). | `[]object` | `[]` |
| `gpus[i].name` | Resource name of the GPU to request directly. | `string` | `""` |
| `gpus[i].className` | GPUClass to take GPUs of. | `string` | `""` |
| `gpus[i].count` | GPUs of the class; 1 when unset. | `int` | `0` |
| `gpus[i].count` | For class entries, a whole number of at least 1; omit count to use 1. All class entries of one VM together may not exceed 1024 GPUs. Raw-name entries must omit count. | `int` | `0` |
| `cpuModel` | Model specifies the CPU model inside the VMI. List of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map | `string` | `""` |
| `firmware` | Firmware and boot configuration (UEFI/BIOS selection, Secure Boot, persistent EFI NVRAM). | `object` | `{}` |
| `firmware.bootloader` | Bootloader to boot the VM with: "uefi" (OVMF) or "bios" (SeaBIOS). Empty inherits the instanceProfile default. | `string` | `""` |
+39 -3
View File
@@ -50,18 +50,54 @@ tests:
- notExists:
path: spec.template.spec.domain.devices.gpus
# A typed client sends the zero value of every field.
- it: reads a zero count and an empty name as unset
- it: refuses an explicit zero class count
set:
gpus:
- className: h100
count: 0
asserts:
- failedTemplate:
errorPattern: "gpus\\[0\\].count must be a whole number of at least 1"
- it: defaults an omitted class count and ignores an empty name
set:
gpus:
- className: h100
name: ""
count: 0
asserts:
- equal:
path: spec.template.metadata.annotations["cozystack.io/gpus"]
value: '[{"className":"h100","count":1}]'
- it: refuses an explicit zero count on a raw entry
set:
gpus:
- name: example.com/gpu
count: 0
asserts:
- failedTemplate:
errorPattern: "gpus\\[0\\]: count applies to className entries only"
- it: refuses a negative count on a raw entry
set:
gpus:
- name: example.com/gpu
count: -1
asserts:
- failedTemplate:
errorPattern: "gpus\\[0\\]: count applies to className entries only"
- it: accepts a raw entry without count
set:
gpus:
- name: example.com/gpu
asserts:
- equal:
path: spec.template.spec.domain.devices.gpus
value:
- name: gpu1
deviceName: example.com/gpu
- it: renders no gpus without entries
asserts:
- notExists:
+1 -1
View File
@@ -144,7 +144,7 @@
}
},
"count": {
"description": "GPUs of the class; 1 when unset.",
"description": "For class entries, a whole number of at least 1; omit count to use 1. All class entries of one VM together may not exceed 1024 GPUs. Raw-name entries must omit count.",
"type": "integer"
},
"name": {
+1 -1
View File
@@ -22,7 +22,7 @@
## @x-cozystack-options {source: gpu}
## @field {string} [className] - GPUClass to take GPUs of.
## @x-cozystack-options {source: gpuclass}
## @field {int} [count] - GPUs of the class; 1 when unset.
## @field {int} [count] - For class entries, a whole number of at least 1; omit count to use 1. All class entries of one VM together may not exceed 1024 GPUs. Raw-name entries must omit count.
## @typedef {struct} Resources - Resource configuration for the virtual machine.
## @field {quantity} [cpu] - Number of CPU cores allocated, as a positive whole number such as `2`. Millicore or other unit-suffixed, fractional, zero, negative, above 4294967295 and quoted leading-zero values are rejected at render time, because the value becomes the VM's unsigned integer `domain.cpu.cores`.
+2 -3
View File
@@ -4,8 +4,7 @@ returns, as JSON, {"names": [...], "classes": [{className, count}]}. An entry
sets exactly one of name and className, count goes with className only and
defaults to 1, and a list holds one kind. Class entries fail without
_cluster.gpu-vm-enabled, since no webhook would resolve them and the VM would
boot without its GPUs. A typed client sends the zero value of every field, so
an empty string and a count of 0 read as unset.
boot without its GPUs.
{{- $gpus := include "cozy-lib.gpu.entries" (list .Values.gpus .Values._cluster) | fromJson }}
*/}}
@@ -22,7 +21,7 @@ an empty string and a count of 0 read as unset.
{{- fail (printf "gpus[%d]: set exactly one of name and className" $i) -}}
{{- end -}}
{{- $count := "1" -}}
{{- if not (empty $gpu.count) -}}
{{- if and (hasKey $gpu "count") (not (kindIs "invalid" $gpu.count)) -}}
{{- if $name -}}
{{- fail (printf "gpus[%d]: count applies to className entries only" $i) -}}
{{- end -}}
@@ -21,7 +21,7 @@ spec:
singular: kubernetesnodes
plural: kubernetesnodeses
openAPISchema: |-
{"title":"Chart Values","type":"object","properties":{"cluster":{"description":"Name of the parent Kubernetes cluster (the `Kubernetes` CR) in the same namespace this node pool attaches to. Required. The pool's CAPI objects are wired to the parent cluster `kubernetes-<cluster>`; the KubernetesNodes CR must be named `<cluster>-<pool>`. The pool's objects are named `kubernetes-<cluster>-<pool>`; when a MachineDeployment of that name already exists and belongs to another Helm release, the render fails instead of taking it over.","type":"string","default":"","x-kubernetes-validations":[{"rule":"self == oldSelf","message":"cluster is immutable"}]},"network":{"description":"Joins this pool's worker VMs to a cozyplane VPC. Must match the parent Kubernetes cluster's `network`, which puts the control plane in the same VPC. Setting or changing it on an existing pool rolls every worker VM of the pool. Requires the cozyplane networking variant and `substrate: kubevirt`.","type":"object","default":{},"properties":{"name":{"description":"Name of the VirtualPrivateCloud (without the \"virtualprivatecloud-\" prefix) in this namespace","type":"string","maxLength":63,"pattern":"^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"}}},"routeTable":{"description":"Name of a cozyplane RouteTable in the VPC's namespace that routes this pool's worker VMs. Empty uses the VPC's default table. Requires `network.name` and the cozyplane networking variant. Like `network`, setting or changing it rolls every worker VM of the pool.","type":"string","default":"","maxLength":253,"pattern":"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)?$"},"storageClass":{"description":"StorageClass for the worker node system disk. When empty, CDI picks the class: the one annotated `storageclass.kubevirt.io/is-default-virt-class`, else the cluster default. Worker VMs live-migrate, so their disks need ReadWriteMany — the RWX access mode is supplied by the chosen StorageClass's CDI StorageProfile — and linstor-csi rejects RWX volumes that are not on a DRBD-backed StorageClass, so prefer a replicated/DRBD class. On an `osImage.builtin` pool this field also decides whether the pool renders at all: the chart refuses a pool whose class differs from its golden's, because across classes CDI either falls back to a host-assisted copy over the pod network (different CSI drivers or volume modes) or leaves a clone into the other class to the CSI driver. Leaving it empty makes the same comparison against the class CDI would pick. On a `builtin` pool the resolved class is then written onto the worker disk rather than left for the cluster to fill in at bind time, so a pool that has already cloned keeps binding on the class its disks are on even after an admin moves the default annotation; on the HTTP path an empty class is still left to the cluster. Has no effect on `substrate: proxmox`, where the worker disk is cloned from the VM template onto the template's storage or `proxmox.storage`.","type":"string","default":"replicated","x-kubernetes-validations":[{"rule":"self == oldSelf","message":"storageClass is immutable"}],"x-cozystack-options":{"source":"storageclass"}},"minReplicas":{"description":"Minimum number of replicas in this pool. Used as the cluster-autoscaler floor.","type":"integer","default":0},"maxReplicas":{"description":"Maximum number of replicas in this pool. Used as the cluster-autoscaler ceiling.","type":"integer","default":10},"instanceType":{"description":"KubeVirt instance type that sizes each worker VM when `resources` is not set. Ignored when `resources.cpu` and `resources.memory` are both set, and therefore on `substrate: proxmox`, which requires them.","type":"string","default":"u1.medium","x-cozystack-options":{"source":"instancetype"}},"diskSize":{"description":"System disk size for the worker VM. Carries the Talos OS image, kubelet state, containerd image cache, and any local-path PVCs. How the OS image reaches the disk follows this pool's `osImage`: the default and `osImage.factory` stream the Image Factory raw artifact in over HTTP, while `osImage.builtin` makes the disk a storage-layer CDI clone of a shared golden image, with no HTTP fetch. A `builtin` pool must keep diskSize at or above the golden's storage size (6Gi in the shipped worker image catalog), because a CDI clone target cannot be smaller than its source -- the chart rejects a smaller value at render time rather than letting the clone stall. Sizing a `builtin` pool also has to allow for transient headroom the finished disk does not show: CDI populates a larger target by cloning the golden at the source size and then growing it, so a worker being provisioned occupies a temporary clone PVC at the golden's size on top of this diskSize, and both are multiplied by the replica count of a replicated StorageClass. The golden itself is a separate one-time cost for the whole cluster, not a per-worker one. So the peak is the golden, plus `diskSize + golden storage` for each workerLine truncated
{"title":"Chart Values","type":"object","properties":{"cluster":{"description":"Name of the parent Kubernetes cluster (the `Kubernetes` CR) in the same namespace this node pool attaches to. Required. The pool's CAPI objects are wired to the parent cluster `kubernetes-<cluster>`; the KubernetesNodes CR must be named `<cluster>-<pool>`. The pool's objects are named `kubernetes-<cluster>-<pool>`; when a MachineDeployment of that name already exists and belongs to another Helm release, the render fails instead of taking it over.","type":"string","default":"","x-kubernetes-validations":[{"rule":"self == oldSelf","message":"cluster is immutable"}]},"network":{"description":"Joins this pool's worker VMs to a cozyplane VPC. Must match the parent Kubernetes cluster's `network`, which puts the control plane in the same VPC. Setting or changing it on an existing pool rolls every worker VM of the pool. Requires the cozyplane networking variant and `substrate: kubevirt`.","type":"object","default":{},"properties":{"name":{"description":"Name of the VirtualPrivateCloud (without the \"virtualprivatecloud-\" prefix) in this namespace","type":"string","maxLength":63,"pattern":"^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"}}},"routeTable":{"description":"Name of a cozyplane RouteTable in the VPC's namespace that routes this pool's worker VMs. Empty uses the VPC's default table. Requires `network.name` and the cozyplane networking variant. Like `network`, setting or changing it rolls every worker VM of the pool.","type":"string","default":"","maxLength":253,"pattern":"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)?$"},"storageClass":{"description":"StorageClass for the worker node system disk. When empty, CDI picks the class: the one annotated `storageclass.kubevirt.io/is-default-virt-class`, else the cluster default. Worker VMs live-migrate, so their disks need ReadWriteMany — the RWX access mode is supplied by the chosen StorageClass's CDI StorageProfile — and linstor-csi rejects RWX volumes that are not on a DRBD-backed StorageClass, so prefer a replicated/DRBD class. On an `osImage.builtin` pool this field also decides whether the pool renders at all: the chart refuses a pool whose class differs from its golden's, because across classes CDI either falls back to a host-assisted copy over the pod network (different CSI drivers or volume modes) or leaves a clone into the other class to the CSI driver. Leaving it empty makes the same comparison against the class CDI would pick. On a `builtin` pool the resolved class is then written onto the worker disk rather than left for the cluster to fill in at bind time, so a pool that has already cloned keeps binding on the class its disks are on even after an admin moves the default annotation; on the HTTP path an empty class is still left to the cluster. Has no effect on `substrate: proxmox`, where the worker disk is cloned from the VM template onto the template's storage or `proxmox.storage`.","type":"string","default":"replicated","x-kubernetes-validations":[{"rule":"self == oldSelf","message":"storageClass is immutable"}],"x-cozystack-options":{"source":"storageclass"}},"minReplicas":{"description":"Minimum number of replicas in this pool. Used as the cluster-autoscaler floor.","type":"integer","default":0},"maxReplicas":{"description":"Maximum number of replicas in this pool. Used as the cluster-autoscaler ceiling.","type":"integer","default":10},"instanceType":{"description":"KubeVirt instance type that sizes each worker VM when `resources` is not set. Ignored when `resources.cpu` and `resources.memory` are both set, and therefore on `substrate: proxmox`, which requires them.","type":"string","default":"u1.medium","x-cozystack-options":{"source":"instancetype"}},"diskSize":{"description":"System disk size for the worker VM. Carries the Talos OS image, kubelet state, containerd image cache, and any local-path PVCs. How the OS image reaches the disk follows this pool's `osImage`: the default and `osImage.factory` stream the Image Factory raw artifact in over HTTP, while `osImage.builtin` makes the disk a storage-layer CDI clone of a shared golden image, with no HTTP fetch. A `builtin` pool must keep diskSize at or above the golden's storage size (6Gi in the shipped worker image catalog), because a CDI clone target cannot be smaller than its source -- the chart rejects a smaller value at render time rather than letting the clone stall. Sizing a `builtin` pool also has to allow for transient headroom the finished disk does not show: CDI populates a larger target by cloning the golden at the source size and then growing it, so a worker being provisioned occupies a temporary clone PVC at the golden's size on top of this diskSize, and both are multiplied by the replica count of a replicated StorageClass. The golden itself is a separate one-time cost for the whole cluster, not a per-worker one. So the peak is the golden, plus `diskSize + golden storage` for each workerLine truncated
release:
labels:
sharding.fluxcd.io/key: tenants
+1 -1
View File
@@ -12,7 +12,7 @@ spec:
singular: vminstance
plural: vminstances
openAPISchema: |-
{"title":"Chart Values","type":"object","properties":{"external":{"description":"Enable external access from outside the cluster.","type":"boolean","default":false},"externalMethod":{"description":"Method to pass through traffic to the VM.","type":"string","default":"PortList","enum":["PortList","WholeIP"]},"externalPorts":{"description":"Ports to forward from outside the cluster.","type":"array","default":[22],"items":{"type":"integer"}},"externalAllowICMP":{"description":"Whether to accept ICMP traffic to the VM in PortList mode (preserves ping and PMTU discovery). No effect in WholeIP mode. Default true so ping behaves as users expect even when port filtering is in effect.","type":"boolean","default":true},"runStrategy":{"description":"Requested running state of the VirtualMachineInstance","type":"string","default":"Always","enum":["Always","Halted","Manual","RerunOnFailure","Once"]},"instanceType":{"description":"Virtual Machine instance type. Ignored when `resources` sizes the VM, which needs whole-number cpu and sockets plus memory; the whole type is dropped then, so any dedicated CPU placement, hugepages, NUMA or realtime settings it carries go with it. While this field is set, a `resources` block that sizes only part of the VM is rejected outright instead of ignored, so complete it or clear it.","type":"string","default":"u1.medium","x-cozystack-options":{"source":"instancetype"}},"instanceProfile":{"description":"Virtual Machine preferences profile.","type":"string","default":"ubuntu","x-cozystack-options":{"source":"instanceprofile"}},"disks":{"description":"List of disks to attach.","type":"array","default":[],"items":{"type":"object","required":["name"],"properties":{"bootOrder":{"description":"Boot priority of the disk, 1 being tried first. Unset falls back to the disk's position in `disks` (the first disk gets 1), so set it to boot from a disk other than the first, such as an attached installer or rescue ISO, without reordering the list. Effective boot orders must be unique across disks: when one disk is given a value that another takes from its position, set both.","type":"integer","minimum":1},"bus":{"description":"Disk bus type (e.g. \"sata\").","type":"string"},"name":{"description":"Disk name.","type":"string","x-cozystack-options":{"source":"vmdisk"}}}}},"networks":{"description":"Networks to attach the VM to. On the cozyplane networking variant the single entry names the VirtualPrivateCloud the VM joins (at most one; the VM keeps its one pod interface).","type":"array","default":[],"items":{"type":"object","properties":{"name":{"description":"Network attachment name.","type":"string","x-cozystack-options":{"source":"network"}}}}},"subnets":{"description":"Deprecated: use networks instead.","type":"array","default":[],"items":{"type":"object","properties":{"name":{"description":"Network attachment name.","type":"string","x-cozystack-options":{"source":"network"}}}}},"routeTable":{"description":"Name of a cozyplane RouteTable in the VM's namespace that routes the VM's traffic. Empty uses the VPC's default table. Requires the cozyplane networking variant and a VPC in `networks`.","type":"string","default":"","maxLength":253,"pattern":"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)?$"},"gpus":{"description":"List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM).","type":"array","default":[],"items":{"type":"object","properties":{"className":{"description":"GPUClass to take GPUs of.","type":"string","x-cozystack-options":{"source":"gpuclass"}},"count":{"description":"GPUs of the class; 1 when unset.","type":"integer"},"name":{"description":"Resource name of the GPU to request directly.","type":"string","x-cozystack-options":{"source":"gpu"}}}}},"cpuModel":{"description":"Model specifies the CPU model inside the VMI. List of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map","type":"string","default":""},"firmware":{"description":"Firmware and boot configuration (UEFI/BIOS selection, Secure Boot, persistent EFI NVRAM).","type":"object","default":{},"properties":{"bootloader":{"description":"Bootloader to boot the VM with: \"uefi\" (OVMF) or \"bios\" (SeaBIOS). Empty inherits the instanceProfile default.","type":"string"},"efiPersistent":{"description":"Persist EFI NVRAM (e.g. enrolled Secure Boot keys, such as an updated Microsoft UEFI CA) across reboots. Only applies when bootloader is \"uefi\".","type":"boolean"},"secureBoot":{"description":"Enable UEFI Secure Boot. Only applies when bootloader is \"uefi\".","type":"boolean"}}},"resources":{"description":"Resource configuration for the virtual machine. Set whole-number cpu and sockets together with memory to size the VM directly, which overrides `instanceType`. Alongside an `instanceType`, a block that sizes only part of the VM is rejected; a whole-number cpu or sockets on its own sizes nothing and is ignored.","type":"object","default":{},"properties":{"cpu":{"description":Line truncated
{"title":"Chart Values","type":"object","properties":{"external":{"description":"Enable external access from outside the cluster.","type":"boolean","default":false},"externalMethod":{"description":"Method to pass through traffic to the VM.","type":"string","default":"PortList","enum":["PortList","WholeIP"]},"externalPorts":{"description":"Ports to forward from outside the cluster.","type":"array","default":[22],"items":{"type":"integer"}},"externalAllowICMP":{"description":"Whether to accept ICMP traffic to the VM in PortList mode (preserves ping and PMTU discovery). No effect in WholeIP mode. Default true so ping behaves as users expect even when port filtering is in effect.","type":"boolean","default":true},"runStrategy":{"description":"Requested running state of the VirtualMachineInstance","type":"string","default":"Always","enum":["Always","Halted","Manual","RerunOnFailure","Once"]},"instanceType":{"description":"Virtual Machine instance type. Ignored when `resources` sizes the VM, which needs whole-number cpu and sockets plus memory; the whole type is dropped then, so any dedicated CPU placement, hugepages, NUMA or realtime settings it carries go with it. While this field is set, a `resources` block that sizes only part of the VM is rejected outright instead of ignored, so complete it or clear it.","type":"string","default":"u1.medium","x-cozystack-options":{"source":"instancetype"}},"instanceProfile":{"description":"Virtual Machine preferences profile.","type":"string","default":"ubuntu","x-cozystack-options":{"source":"instanceprofile"}},"disks":{"description":"List of disks to attach.","type":"array","default":[],"items":{"type":"object","required":["name"],"properties":{"bootOrder":{"description":"Boot priority of the disk, 1 being tried first. Unset falls back to the disk's position in `disks` (the first disk gets 1), so set it to boot from a disk other than the first, such as an attached installer or rescue ISO, without reordering the list. Effective boot orders must be unique across disks: when one disk is given a value that another takes from its position, set both.","type":"integer","minimum":1},"bus":{"description":"Disk bus type (e.g. \"sata\").","type":"string"},"name":{"description":"Disk name.","type":"string","x-cozystack-options":{"source":"vmdisk"}}}}},"networks":{"description":"Networks to attach the VM to. On the cozyplane networking variant the single entry names the VirtualPrivateCloud the VM joins (at most one; the VM keeps its one pod interface).","type":"array","default":[],"items":{"type":"object","properties":{"name":{"description":"Network attachment name.","type":"string","x-cozystack-options":{"source":"network"}}}}},"subnets":{"description":"Deprecated: use networks instead.","type":"array","default":[],"items":{"type":"object","properties":{"name":{"description":"Network attachment name.","type":"string","x-cozystack-options":{"source":"network"}}}}},"routeTable":{"description":"Name of a cozyplane RouteTable in the VM's namespace that routes the VM's traffic. Empty uses the VPC's default table. Requires the cozyplane networking variant and a VPC in `networks`.","type":"string","default":"","maxLength":253,"pattern":"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)?$"},"gpus":{"description":"List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM).","type":"array","default":[],"items":{"type":"object","properties":{"className":{"description":"GPUClass to take GPUs of.","type":"string","x-cozystack-options":{"source":"gpuclass"}},"count":{"description":"For class entries, a whole number of at least 1; omit count to use 1. All class entries of one VM together may not exceed 1024 GPUs. Raw-name entries must omit count.","type":"integer"},"name":{"description":"Resource name of the GPU to request directly.","type":"string","x-cozystack-options":{"source":"gpu"}}}}},"cpuModel":{"description":"Model specifies the CPU model inside the VMI. List of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map","type":"string","default":""},"firmware":{"description":"Firmware and boot configuration (UEFI/BIOS selection, Secure Boot, persistent EFI NVRAM).","type":"object","default":{},"properties":{"bootloader":{"description":"Bootloader to boot the VM with: \"uefi\" (OVMF) or \"bios\" (SeaBIOS). Empty inherits the instanceProfile default.","type":"string"},"efiPersistent":{"description":"Persist EFI NVRAM (e.g. enrolled Secure Boot keys, such as an updated Microsoft UEFI CA) across reboots. Only applies when bootloader is \"uefi\".","type":"boolean"},"secureBoot":{"description":"Enable UEFI Secure Boot. Only applies when bootloader is \"uefi\".","type":"boolean"}}},"resources":{"description":"Resource configuration for the virtual machine. Set whole-number cpu and sockets together with memory to size the VM directly, which overrides `instanceType`. Alongside an `instanceType`, a block that sizes only part of the VM is rejected; a Line truncated
release:
prefix: vm-instance-
labels: