mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-03 18:47:04 +09:00
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>
119 lines
4.6 KiB
YAML
119 lines
4.6 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.
|
|
## @x-cozystack-options {source: vmdisk}
|
|
## @field {string} [bus] - Disk bus type (e.g. "sata").
|
|
|
|
## @typedef {struct} Network - Network to attach the VM to.
|
|
## @field {string} [name] - Network attachment name.
|
|
## @x-cozystack-options {source: network}
|
|
|
|
## @typedef {struct} GPU - GPU device configuration.
|
|
## @field {string} name - The name of the GPU resource to attach.
|
|
## @x-cozystack-options {source: gpu}
|
|
|
|
## @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
|
|
|
|
## @typedef {struct} ExternalIP - A reserved external address for one of the application's external endpoints.
|
|
## @field {string} claim - 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.
|
|
## @field {string} [target] - 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.
|
|
|
|
## @param {[]ExternalIP} externalIPs - 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.
|
|
externalIPs: []
|
|
## Example:
|
|
## externalIPs:
|
|
## - claim: my-vm-address
|
|
|
|
## @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
|
|
|
|
## @param {bool} externalAllowICMP - 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.
|
|
externalAllowICMP: true
|
|
|
|
## @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.
|
|
## @x-cozystack-options {source: instancetype}
|
|
instanceType: "u1.medium"
|
|
|
|
## @param {string} instanceProfile - Virtual Machine preferences profile.
|
|
## @x-cozystack-options {source: instanceprofile}
|
|
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"
|