mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-06 03:57:52 +09:00
resources.cpu and resources.sockets are typed as quantities, but they land in domain.cpu.cores and domain.cpu.sockets, which KubeVirt declares as uint32. The chart cast them with int64, which turns 500m, 1.5 or 1e1 into 0 without an error, and KubeVirt boots a zero core count as one core. The user asked for half a core and got a one-core VM with nothing reporting it. The raw spelling is now decoded as YAML, the way an integer field reads it, and the render stops unless the result is a positive whole number that fits in uint32. A leading zero is refused, because YAML reads 010 as octal 8. The check keys on presence rather than truthiness, so an unquoted 0 is refused instead of being read as unset. Memory gets the same presence check. A quoted "0" was truthy and rendered requests.memory: "0", while an unquoted 0 was falsy and dropped, so one quantity took two paths. A zero or negative amount now stops the render in both spellings. BREAKING CHANGE: values that used to render now either fail or render differently. A cpu or sockets that does not decode to a plain whole number within uint32 (a millicore, suffixed such as 1k, fractional, zero, negative or leading-zero value), and a zero or negative memory, fail the next upgrade of the release until the value is fixed. This includes cpu or sockets set on its own beside an instanceType, which used to be ignored whatever it held. A spelling that the int64 cast truncated to 0 but that YAML decodes to a whole number, such as the exponent 1e1 or the trailing dot 2., used to boot one core and now sizes the VM with the count it spells, so such a VM changes size on upgrade. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>
230 lines
7.4 KiB
JSON
230 lines
7.4 KiB
JSON
{
|
|
"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": {
|
|
"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.",
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"gpus": {
|
|
"description": "List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM).",
|
|
"type": "array",
|
|
"default": [],
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"description": "The name of the GPU resource to attach.",
|
|
"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\". On default RWO storage the VM is node-pinned (no live-migration).",
|
|
"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": "Number of CPU cores allocated, as a positive whole number such as `2`. Millicore and fractional quantities are rejected at render time, because the value becomes the VM's integer `domain.cpu.cores`.",
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"memory": {
|
|
"description": "Amount of memory allocated, as a positive quantity such as `8Gi`.",
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"sockets": {
|
|
"description": "Number of CPU sockets (vCPU topology), as a positive whole number such as `1`. Millicore and fractional quantities are rejected at render time, because the value becomes the VM's integer `domain.cpu.sockets`.",
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"x-kubernetes-int-or-string": true
|
|
}
|
|
}
|
|
},
|
|
"sshKeys": {
|
|
"description": "List of SSH public keys for authentication.",
|
|
"type": "array",
|
|
"default": [],
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"cloudInit": {
|
|
"description": "Cloud-init user data.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"cloudInitSeed": {
|
|
"description": "Seed string to generate SMBIOS UUID for the VM.",
|
|
"type": "string",
|
|
"default": ""
|
|
}
|
|
}
|
|
}
|