mirror of
https://github.com/cozystack/cozystack.git
synced 2026-10-26 21:17:32 +09:00
Keying the network-data on instanceProfile reached every VM that never set the field, because the profile defaults to ubuntu whatever image the disk holds. The sysconfig, NetworkManager and eni renderers turn each match stanza into an interface literally named after the netplan ID, so a non-netplan guest left on the default profile would lose the DHCP it gets today. A VM with neither cloudInit nor sshKeys would also gain a cloud-init disk on upgrade, and KubeVirt's NoCloud instance-id is new to that guest, so its next boot would regenerate host keys as a first boot. The configuration also shadows a static NIC set up through netplan: netplan emits one networkd file per ID, networkd applies only the first file in lexical order that matches a link, and 10-netplan-cozy-en sorts before the file for enp2s0. The external-VLAN recipe claimed otherwise. An explicit netplanDhcp value, off by default, leaves every existing VM rendering exactly as before and lets the documentation say when not to turn it on. Assisted-by: LLM Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
235 lines
8.3 KiB
JSON
235 lines
8.3 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\".",
|
|
"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 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`.",
|
|
"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 quantity of at least `1M` such as `8Gi`. Less than 1M is rejected at render time, because KubeVirt refuses a non-zero amount below 1M and a zero or negative amount sizes nothing.",
|
|
"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 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.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": ""
|
|
},
|
|
"netplanDhcp": {
|
|
"description": "Supply cloud-init network-data that requests DHCP on every `en*` and `eth*` interface and keeps the DNS search domains DHCP offers. Needed for a netplan guest (Ubuntu, Debian) to address a secondary network such as a VPC subnet. Leave it off for a guest rendered by anything other than netplan, which would lose DHCP on every interface, and for a guest that configures an interface statically through netplan, which this configuration would shadow. Turning it on for a VM that has neither `cloudInit` nor `sshKeys` adds a cloud-init disk, and the guest's next boot is then treated as a first boot.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"cloudInitSeed": {
|
|
"description": "Seed string to generate SMBIOS UUID for the VM.",
|
|
"type": "string",
|
|
"default": ""
|
|
}
|
|
}
|
|
}
|