flintlock.types
Table of Contents
types/microvm.proto
CPUConfig
CPUConfig represents CPU feature configuration for a microvm.
| Field | Type | Label | Description |
|---|---|---|---|
| features_to_enable | string | repeated | FeaturesToEnable is a list of optional CPU features to enable. Supported by all providers, but the accepted values are provider specific (e.g. named features such as “amx” for Cloud Hypervisor, or numeric KVM capability IDs for Firecracker). The “!” prefix is reserved for KVMCapabilitiesToDisable and is not allowed here. |
| kvm_capabilities_to_disable | string | repeated | KVMCapabilitiesToDisable is a list of KVM capability IDs to disable. Only supported by providers that declare the KVMCapabilitiesDisable capability (currently Firecracker only). |
ContainerVolumeSource
ContainerVolumeSource represents the details of a volume coming from a OCI image.
| Field | Type | Label | Description |
|---|---|---|---|
| image | string | Image specifies the conatiner image to use for the volume. |
Initrd
Initrd represents the configuration for the initial ramdisk.
| Field | Type | Label | Description |
|---|---|---|---|
| image | string | Image is the container image to use. | |
| filename | string | optional | Filename is used to specify the name of the kernel file in the Image. Defaults to initrd |
Kernel
Kernel represents the configuration for a kernel.
| Field | Type | Label | Description |
|---|---|---|---|
| image | string | Image is the container image to use. | |
| cmdline | Kernel.CmdlineEntry | repeated | Cmdline is the additional kernel command line args. Each provider has its own recommended list, they will be used automatically. This field is for additional values. |
| filename | string | optional | Filename is used to specify the name of the kernel file in the Image. |
| add_network_config | bool | AddNetworkConfig if set to true indicates that the network-config kernel argument should be generated. |
Kernel.CmdlineEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string |
MicroVM
MicroVM represents a microvm machine that is created via a provider.
| Field | Type | Label | Description |
|---|---|---|---|
| version | int32 | ||
| spec | MicroVMSpec | Spec is the specification of the microvm. | |
| status | MicroVMStatus | Status is the runtime status of the microvm. |
MicroVMSpec
MicroVMSpec represents the specification for a microvm.
| Field | Type | Label | Description |
|---|---|---|---|
| id | string | ID is the identifier of the microvm. If this empty at creation time a ID will be automatically generated. | |
| namespace | string | Namespace is the name of the namespace the microvm belongs to. | |
| labels | MicroVMSpec.LabelsEntry | repeated | Labels allows you to include extra data for the microvms. |
| vcpu | int32 | VCPU specifies how many vcpu the machine will be allocated. | |
| memory_in_mb | int32 | MemoryInMb is the amount of memory in megabytes that the machine will be allocated. | |
| kernel | Kernel | Kernel is the details of the kernel to use . | |
| initrd | Initrd | optional | Initrd is the optional details of the initial ramdisk. |
| root_volume | Volume | RootVolume specifies the root volume mount for the MicroVM. | |
| additional_volumes | Volume | repeated | AdditionalVolumes specifies the volumes to be attached to the microvm. |
| interfaces | NetworkInterface | repeated | Interfaces specifies the network interfaces to be attached to the microvm. Device names on the guest machine are determined by the order defined in the list starting from eth1, eth2, …, ethN. |
| metadata | MicroVMSpec.MetadataEntry | repeated | Metadata allows you to specify data to be added to the metadata service. The key is the name of the metadata item and the value is the base64 encoded contents of the metadata. |
| created_at | google.protobuf.Timestamp | CreatedAt indicates the time the microvm was created at. | |
| updated_at | google.protobuf.Timestamp | UpdatedAt indicates the time the microvm was last updated. | |
| deleted_at | google.protobuf.Timestamp | DeletedAt indicates the time the microvm was marked as deleted. | |
| uid | string | optional | UID is a globally unique identifier of the microvm. |
| provider | string | optional | Provider allows you to specify the name of the microvm provider to use. If this isn’t supplied then the default provider will be used. |
| allow_guest_agent | bool | AllowGuestAgent, when true, attaches a vsock device to the microvm so the in-guest guest-agent (https://github.com/liquidmetal-dev/guest-agent) can communicate with the host. | |
| cpu_config | CPUConfig | optional | CPUConfig allows you to customise the CPU features presented to the guest. Support and semantics vary by provider. |
MicroVMSpec.LabelsEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string |
MicroVMSpec.MetadataEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string |
MicroVMStatus
MicroVMStatus contains the runtime status of the microvm.
| Field | Type | Label | Description |
|---|---|---|---|
| state | MicroVMStatus.MicroVMState | State stores information about the last known state of the vm and the spec. | |
| volumes | MicroVMStatus.VolumesEntry | repeated | Volumes holds the status of the volumes. |
| kernel_mount | Mount | KernelMount holds the status of the kernel mount point. | |
| initrd_mount | Mount | InitrdMount holds the status of the initrd mount point. | |
| network_interfaces | MicroVMStatus.NetworkInterfacesEntry | repeated | NetworkInterfaces holds the status of the network interfaces. |
| retry | int32 | Retry is a counter about how many times we retried to reconcile. | |
| vsock_path | string | VsockPath is the host unix-domain socket path for the guest-agent vsock device. Empty unless allow_guest_agent is set on the spec. Use with the vsock-connect host helper. |
MicroVMStatus.NetworkInterfacesEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | NetworkInterfaceStatus |
MicroVMStatus.VolumesEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | VolumeStatus |
Mount
Mount represents a volume mount point.
| Field | Type | Label | Description |
|---|---|---|---|
| type | Mount.MountType | Type specifies the type of the mount (e.g. device or directory). | |
| source | string | Source is the location of the mounted volume. |
NetworkInterface
| Field | Type | Label | Description |
|---|---|---|---|
| device_id | string | DeviceID is the ID of the interface. If guest_mac is not set, this value is also used to match the interface by name inside the guest, so it effectively becomes the guest interface name. Do not set this to eth0: Firecracker reserves that name for its own use, which causes a misleading network-interfaces error when creating the microvm. Use a different device_id (e.g. eth1) or set guest_mac to match by MAC address instead. | |
| type | NetworkInterface.IfaceType | IfaceType specifies the type of network interface to create for use by the guest. | |
| guest_mac | string | optional | GuestMAC allows the specifying of a specifi MAC address to use for the interface. If not supplied a autogenerated MAC address will be used. |
| address | StaticAddress | optional | Address is an optional static IP address to manually assign to this interface. If not supplied then DHCP will be used. |
| overrides | NetworkOverrides | optional | Overrides is optional overrides applicable for network configuration. |
NetworkInterfaceStatus
| Field | Type | Label | Description |
|---|---|---|---|
| host_device_name | string | HostDeviceName is the name of the network interface used from the host. This will be a tuntap or macvtap interface. | |
| index | int32 | Index is the index of the network interface on the host. | |
| mac_address | string | MACAddress is the MAC address of the host interface. |
NetworkOverrides
NetworkOverrides represents override values for a network interface.
| Field | Type | Label | Description |
|---|---|---|---|
| bridge_name | string | optional | BridgeName is the name of the Linux bridge to attach TAP devices to. This overrides any value set at the overall flintlock level. |
StaticAddress
StaticAddress represents a static IPv4 or IPv6 address.
| Field | Type | Label | Description |
|---|---|---|---|
| address | string | Address is the static IP address (IPv4 or IPv6) to assign to this interface. Must be CIDR notation. | |
| gateway | string | optional | Gateway is used to optionaly set the default gateway for IPv4 or IPv6. |
| nameservers | string | repeated | Nameservers allows you to optionaly specify nameservers for the interface. |
VirtioFSVolumeSource
VirtioFSVolumeSource represents the details of a volume which is a directory of the host, shared with virtiofs.
| Field | Type | Label | Description |
|---|---|---|---|
| path | string | Path on the host machine to pass through. |
Volume
Volume represents the configuration for a volume to be attached to a microvm.
| Field | Type | Label | Description |
|---|---|---|---|
| id | string | ID is the uinique identifier of the volume. | |
| is_read_only | bool | IsReadOnly specifies that the volume is to be mounted readonly. It is not supported for a virtiofs volume, and a spec that sets it for one is rejected. | |
| mount_point | string | optional | MountPoint allows you to optionally specify a mount point for the volume. This only applies to additional volumes and it will use cloud-init to mount the volumes. A virtiofs volume is mounted by its tag with the virtiofs filesystem type, which the guest kernel has to support. |
| source | VolumeSource | Source is where the volume will be sourced from. | |
| partition_id | string | optional | PartitionID is the uuid of the boot partition. |
| size_in_mb | int32 | optional | Size is the size to resize this volume to. |
TODO: add rate limiting |
VolumeSource
VolumeSource is the source of a volume. Based loosely on the volumes in Kubernetes Pod specs.
| Field | Type | Label | Description |
|---|---|---|---|
| container_source | string | optional | Container is used to specify a source of a volume as a OCI container. |
| virtiofs_source | string | optional | Used for the virtiofs source path |
VolumeStatus
| Field | Type | Label | Description |
|---|---|---|---|
| mount | Mount | Mount represents a volume mount point. |
MicroVMStatus.MicroVMState
| Name | Number | Description |
|---|---|---|
| PENDING | 0 | |
| CREATED | 1 | |
| FAILED | 2 | |
| DELETING | 3 |
Mount.MountType
| Name | Number | Description |
|---|---|---|
| DEV | 0 | |
| HOSTPATH | 1 |
NetworkInterface.IfaceType
| Name | Number | Description |
|---|---|---|
| MACVTAP | 0 | MACVTAP represents a network interface that is macvtap. |
| TAP | 1 | TAP represents a network interface that is a tap. |
Scalar Value Types
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
|---|---|---|---|---|---|---|---|---|
| double | double | double | float | float64 | double | float | Float | |
| float | float | float | float | float32 | float | float | Float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| bool | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |