Files
cozystack/packages/apps/vm-instance/values.schema.json
Andrei Kvapil 8b2223d1b9 feat(vm-instance): let the external endpoint wear a reserved address
The claim annotation lands on the VM's own Service beside the cozy-proxy
datapath annotations already there. The two are independent: whole-IP NAT
behaves the same on a held address as on an auto-assigned one, so both methods
take a reservation.

A VM has one external endpoint, so attaching several addresses to one VM stays
out of reach of this field — that needs the exposure half of the model, not the
allocation half.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-09-07 18:39:34 +02:00

232 lines
6.6 KiB
JSON

{
"title": "Chart Values",
"type": "object",
"properties": {
"external": {
"description": "Enable external access from outside the cluster.",
"type": "boolean",
"default": false
},
"externalIPs": {
"description": "Reserved addresses for the endpoints `external: true` publishes. Each entry pins one endpoint to an address held by an IPAddressClaim, so the address survives a rebuild of this VM. Empty lets the load balancer assign any free address, as before.",
"type": "array",
"default": [],
"items": {
"type": "object",
"required": [
"claim"
],
"properties": {
"claim": {
"description": "Name of an IPAddressClaim in this namespace whose address the endpoint should wear. Until the claim binds, the endpoint keeps whatever address the load balancer assigned.",
"type": "string"
},
"target": {
"description": "Which external endpoint to pin. `default` is the VM's own Service, the endpoint `external: true` publishes, and is the default. A VM has one external endpoint, so attaching several addresses to one VM is not expressible here.",
"type": "string"
}
}
}
},
"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.",
"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": ""
},
"resources": {
"description": "Resource configuration for the virtual machine.",
"type": "object",
"default": {},
"properties": {
"cpu": {
"description": "Number of CPU cores allocated.",
"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.",
"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).",
"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": ""
}
}
}