Skip to content

flintlock.types

Table of Contents

Top

types/microvm.proto

CPUConfig

CPUConfig represents CPU feature configuration for a microvm.

FieldTypeLabelDescription
features_to_enablestringrepeatedFeaturesToEnable 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_disablestringrepeatedKVMCapabilitiesToDisable 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.

FieldTypeLabelDescription
imagestringImage specifies the conatiner image to use for the volume.

Initrd

Initrd represents the configuration for the initial ramdisk.

FieldTypeLabelDescription
imagestringImage is the container image to use.
filenamestringoptionalFilename is used to specify the name of the kernel file in the Image. Defaults to initrd

Kernel

Kernel represents the configuration for a kernel.

FieldTypeLabelDescription
imagestringImage is the container image to use.
cmdlineKernel.CmdlineEntryrepeatedCmdline 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.
filenamestringoptionalFilename is used to specify the name of the kernel file in the Image.
add_network_configboolAddNetworkConfig if set to true indicates that the network-config kernel argument should be generated.

Kernel.CmdlineEntry

FieldTypeLabelDescription
keystring
valuestring

MicroVM

MicroVM represents a microvm machine that is created via a provider.

FieldTypeLabelDescription
versionint32
specMicroVMSpecSpec is the specification of the microvm.
statusMicroVMStatusStatus is the runtime status of the microvm.

MicroVMSpec

MicroVMSpec represents the specification for a microvm.

FieldTypeLabelDescription
idstringID is the identifier of the microvm. If this empty at creation time a ID will be automatically generated.
namespacestringNamespace is the name of the namespace the microvm belongs to.
labelsMicroVMSpec.LabelsEntryrepeatedLabels allows you to include extra data for the microvms.
vcpuint32VCPU specifies how many vcpu the machine will be allocated.
memory_in_mbint32MemoryInMb is the amount of memory in megabytes that the machine will be allocated.
kernelKernelKernel is the details of the kernel to use .
initrdInitrdoptionalInitrd is the optional details of the initial ramdisk.
root_volumeVolumeRootVolume specifies the root volume mount for the MicroVM.
additional_volumesVolumerepeatedAdditionalVolumes specifies the volumes to be attached to the microvm.
interfacesNetworkInterfacerepeatedInterfaces 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.
metadataMicroVMSpec.MetadataEntryrepeatedMetadata 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_atgoogle.protobuf.TimestampCreatedAt indicates the time the microvm was created at.
updated_atgoogle.protobuf.TimestampUpdatedAt indicates the time the microvm was last updated.
deleted_atgoogle.protobuf.TimestampDeletedAt indicates the time the microvm was marked as deleted.
uidstringoptionalUID is a globally unique identifier of the microvm.
providerstringoptionalProvider 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_agentboolAllowGuestAgent, 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_configCPUConfigoptionalCPUConfig allows you to customise the CPU features presented to the guest. Support and semantics vary by provider.

MicroVMSpec.LabelsEntry

FieldTypeLabelDescription
keystring
valuestring

MicroVMSpec.MetadataEntry

FieldTypeLabelDescription
keystring
valuestring

MicroVMStatus

MicroVMStatus contains the runtime status of the microvm.

FieldTypeLabelDescription
stateMicroVMStatus.MicroVMStateState stores information about the last known state of the vm and the spec.
volumesMicroVMStatus.VolumesEntryrepeatedVolumes holds the status of the volumes.
kernel_mountMountKernelMount holds the status of the kernel mount point.
initrd_mountMountInitrdMount holds the status of the initrd mount point.
network_interfacesMicroVMStatus.NetworkInterfacesEntryrepeatedNetworkInterfaces holds the status of the network interfaces.
retryint32Retry is a counter about how many times we retried to reconcile.
vsock_pathstringVsockPath 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

FieldTypeLabelDescription
keystring
valueNetworkInterfaceStatus

MicroVMStatus.VolumesEntry

FieldTypeLabelDescription
keystring
valueVolumeStatus

Mount

Mount represents a volume mount point.

FieldTypeLabelDescription
typeMount.MountTypeType specifies the type of the mount (e.g. device or directory).
sourcestringSource is the location of the mounted volume.

NetworkInterface

FieldTypeLabelDescription
device_idstringDeviceID 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.
typeNetworkInterface.IfaceTypeIfaceType specifies the type of network interface to create for use by the guest.
guest_macstringoptionalGuestMAC allows the specifying of a specifi MAC address to use for the interface. If not supplied a autogenerated MAC address will be used.
addressStaticAddressoptionalAddress is an optional static IP address to manually assign to this interface. If not supplied then DHCP will be used.
overridesNetworkOverridesoptionalOverrides is optional overrides applicable for network configuration.

NetworkInterfaceStatus

FieldTypeLabelDescription
host_device_namestringHostDeviceName is the name of the network interface used from the host. This will be a tuntap or macvtap interface.
indexint32Index is the index of the network interface on the host.
mac_addressstringMACAddress is the MAC address of the host interface.

NetworkOverrides

NetworkOverrides represents override values for a network interface.

FieldTypeLabelDescription
bridge_namestringoptionalBridgeName 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.

FieldTypeLabelDescription
addressstringAddress is the static IP address (IPv4 or IPv6) to assign to this interface. Must be CIDR notation.
gatewaystringoptionalGateway is used to optionaly set the default gateway for IPv4 or IPv6.
nameserversstringrepeatedNameservers 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.

FieldTypeLabelDescription
pathstringPath on the host machine to pass through.

Volume

Volume represents the configuration for a volume to be attached to a microvm.

FieldTypeLabelDescription
idstringID is the uinique identifier of the volume.
is_read_onlyboolIsReadOnly 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_pointstringoptionalMountPoint 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.
sourceVolumeSourceSource is where the volume will be sourced from.
partition_idstringoptionalPartitionID is the uuid of the boot partition.
size_in_mbint32optionalSize 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.

FieldTypeLabelDescription
container_sourcestringoptionalContainer is used to specify a source of a volume as a OCI container.
virtiofs_sourcestringoptionalUsed for the virtiofs source path

VolumeStatus

FieldTypeLabelDescription
mountMountMount represents a volume mount point.

MicroVMStatus.MicroVMState

NameNumberDescription
PENDING0
CREATED1
FAILED2
DELETING3

Mount.MountType

NameNumberDescription
DEV0
HOSTPATH1

NetworkInterface.IfaceType

NameNumberDescription
MACVTAP0MACVTAP represents a network interface that is macvtap.
TAP1TAP represents a network interface that is a tap.

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)