Rename the misleading 'subnets' field to 'networks' in VMInstance to better reflect that it attaches the VM to VPC network attachments, not creates subnets. The old 'subnets' field is kept as deprecated with fallback logic for backward compatibility. Add an API-backed dropdown (listInput) for networks[].name that lists available NetworkAttachmentDefinitions in the namespace, and hide the deprecated subnets field from the dashboard UI. Assisted-By: Claude AI Signed-off-by: Kirill Ilin <stitch14@yandex.ru>
100 lines
3.2 KiB
YAML
100 lines
3.2 KiB
YAML
##
|
|
## @section Common parameters
|
|
##
|
|
|
|
## @enum {string} ExternalMethod - Method to pass through traffic to the VM.
|
|
## @value PortList - Forward selected ports only.
|
|
## @value WholeIP - Forward all traffic for the IP.
|
|
|
|
## @typedef {struct} Disk - Disk configuration.
|
|
## @field {string} name - Disk name.
|
|
## @field {string} [bus] - Disk bus type (e.g. "sata").
|
|
|
|
## @typedef {struct} Network - Network to attach the VM to.
|
|
## @field {string} [name] - Network attachment name.
|
|
|
|
## @typedef {struct} GPU - GPU device configuration.
|
|
## @field {string} name - The name of the GPU resource to attach.
|
|
|
|
## @typedef {struct} Resources - Resource configuration for the virtual machine.
|
|
## @field {quantity} [cpu] - Number of CPU cores allocated.
|
|
## @field {quantity} [memory] - Amount of memory allocated.
|
|
## @field {quantity} [sockets] - Number of CPU sockets (vCPU topology).
|
|
|
|
## @param {bool} external - Enable external access from outside the cluster.
|
|
external: false
|
|
|
|
## @param {ExternalMethod} externalMethod - Method to pass through traffic to the VM.
|
|
externalMethod: PortList
|
|
|
|
## @param {[]int} externalPorts - Ports to forward from outside the cluster.
|
|
externalPorts:
|
|
- 22
|
|
|
|
## @enum {string} RunStrategy - Requested running state of the VirtualMachineInstance
|
|
## @value Always - VMI should always be running
|
|
## @value Halted - VMI should never be running
|
|
## @value Manual - VMI can be started/stopped using API endpoints
|
|
## @value RerunOnFailure - VMI will initially be running and restarted if a failure occurs, but will not be restarted upon successful completion
|
|
## @value Once - VMI will run once and not be restarted upon completion regardless if the completion is of phase Failure or Success
|
|
|
|
## @param {RunStrategy} runStrategy - Requested running state of the VirtualMachineInstance
|
|
runStrategy: Always
|
|
|
|
## @param {string} instanceType - Virtual Machine instance type.
|
|
instanceType: "u1.medium"
|
|
|
|
## @param {string} instanceProfile - Virtual Machine preferences profile.
|
|
instanceProfile: ubuntu
|
|
|
|
## @param {[]Disk} disks - List of disks to attach.
|
|
disks: []
|
|
## Example:
|
|
## disks:
|
|
## - name: example-system
|
|
## - name: example-data
|
|
## bus: sata
|
|
|
|
## @param {[]Network} networks - Networks to attach the VM to.
|
|
networks: []
|
|
## Example:
|
|
## networks:
|
|
## - name: subnet-84dbec17
|
|
## - name: subnet-aa8896b5
|
|
|
|
## @param {[]Network} subnets - Deprecated: use networks instead.
|
|
subnets: []
|
|
|
|
## @param {[]GPU} gpus - List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM).
|
|
gpus: []
|
|
## Example:
|
|
## gpus:
|
|
## - name: nvidia.com/GA102GL_A10
|
|
|
|
## @param {string} cpuModel - Model specifies the CPU model inside the VMI. List of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map
|
|
cpuModel: ""
|
|
|
|
## @param {Resources} [resources] - Resource configuration for the virtual machine.
|
|
resources: {}
|
|
|
|
## @param {[]string} sshKeys - List of SSH public keys for authentication.
|
|
sshKeys: []
|
|
## Example:
|
|
## sshKeys:
|
|
## - ssh-rsa ...
|
|
## - ssh-ed25519 ...
|
|
##
|
|
|
|
## @param {string} cloudInit - Cloud-init user data.
|
|
cloudInit: ""
|
|
## Example:
|
|
## cloudInit: |
|
|
## #cloud-config
|
|
## password: ubuntu
|
|
## chpasswd: { expire: False }
|
|
##
|
|
|
|
## @param {string} cloudInitSeed - Seed string to generate SMBIOS UUID for the VM.
|
|
cloudInitSeed: ""
|
|
## Example:
|
|
## cloudInitSeed: "upd1"
|