Replies: 10 comments 12 replies
-
memory_in_mb: 512 Our main target is to manage kubernetes clusters, 512m seems a bit small for that as a default value. interfaces.allow_metadata_req: false Do we want to allow users to set this flag on any devices? If we create a device that can access the metadata service, couldn't we just say "nah, don't worry, you can access it" and remove this field from from the request. interfaces.guest_device_name: eth0 A note before we forget it, we have to validate if none of the provided network interfaces have the same name, applies to the auto-generated metadata enabled device as well, so we have to set that device name as a reserved name. minimal MicroVM
interfaces.type: 0 Maybe it's out of scope, but I think we should let the user set string based enum values like "tap" or "macvtap" instead of a non-descriptive int value. |
Beta Was this translation helpful? Give feedback.
-
I think this sounds really sensible, but yeh out of scope I feel. Are we going to have a separate ADR to discuss opinionated things which a user cannot alter? |
Beta Was this translation helpful? Give feedback.
-
I propose that we also change how we declare volumes and separate out the root volume so you end up with
I like this clean separation and it allows us to hide |
Beta Was this translation helpful? Give feedback.
-
Updated: - Date: 2021-11-010
+ Date: 2021-11-10 |
Beta Was this translation helpful? Give feedback.
-
for this I feel like defaulting the namespace to |
Beta Was this translation helpful? Give feedback.
-
@weaveworks/quick-silver Updated ADR. There are still two unknowns that would be good to discuss. I've drafted the proposed final decision, but it's still open to discussion! |
Beta Was this translation helpful? Give feedback.
-
"Network interface name" is in the table twice
The (admittedly small) risk would be if they specified 2 volumes and set one non-root to be mounted at
By volume name do you mean the volume id field? |
Beta Was this translation helpful? Give feedback.
-
@Callisto13 brings up a good point regarding possible
Rethinking this as I am not sure it makes much sense, hard to imagine cases where a user wouldn't provide an ID for volumes. Unless there are any other concerns then I would like to propose we accept this decision. Need two +1's (not including myself) to accept and merge into the repo. Please reply to this comment with +1 if you're happy with it. |
Beta Was this translation helpful? Give feedback.
-
I think we should include the RootVolume / AdditionalVolumes change as well. |
Beta Was this translation helpful? Give feedback.
-
This ADR has received two approvals, and has been merged in #262. Locking conversation! |
Beta Was this translation helpful? Give feedback.
-
Opinionated API Changes
Context
Flintlock requires users to specify all aspects of the MicroVM spec. If something (e.g. metadata network interface) is not included in the MicroVM spec, then it won't be created. This proposal details some possible opinionated defaults for MicroVM specifications in cases where an explicit configuration is not provided by the user.
Scope
The scope of this proposal is not to decide on what aspects of MicroVM specifications are immutable / non-configurable. Rather it is to explore which potential aspects of the MicroVM specification can be provided by default, but also overridden/customised by the user if they so wish to.
Default Configurations
Below are some proposed default configurations, along with default values where relevant.
MicroVM.VCPU
MicroVM.MemoryInMb
vcpu: 2
memory_in_mb: 1024
default
namespaceMicroVM.Namespace
default
169.254.0.1/16
andallow_metadata_req: true
MicroVM.NetworkInterfaces
169.254.0.1/16
allow_metadata_req
option on the network interface modelMicroVM.NetworkInterfaces
MicroVM.NetworkInterfaces[*].GuestDeviceName
RootVolume
andAdditionalVolumes[]
Volumes
field in the model into two fields.RootVolume
specifically for the root volume, allowing us to hide theis_root
flag, andAdditionalVolumes[]
for non-root volumes.MicroVM.Volumes
MicroVM.RootVolume
andMicroVM.AdditionalVolumes[]
Unknowns/Discussion
Can we generate volume names?If a volume is marked asis_root: true
, can we automatically mount it at/
ifmount_point
is not specified?Request Example
With the defaults as described in Default Configurations, a minimal MicroVM create request would look as follows:
Decision
Implement the following changes to the Flintlock API:
MicroVM.VCPU
MicroVM.MemoryInMb
vcpu: 2
memory_in_mb: 1024
default
namespaceMicroVM.Namespace
default
169.254.0.1/16
andallow_metadata_req: true
MicroVM.NetworkInterfaces
169.254.0.1/16
allow_metadata_req
option on the network interface modelMicroVM.NetworkInterfaces
MicroVM.NetworkInterfaces[*].GuestDeviceName
RootVolume
andAdditionalVolumes[]
Volumes
field in the model into two fields.RootVolume
specifically for the root volume, allowing us to hide theis_root
flag, andAdditionalVolumes[]
for non-root volumes.MicroVM.Volumes
MicroVM.RootVolume
andMicroVM.AdditionalVolumes[]
Note: This proposal specifically avoids diving too deep into implementation details. E.g. Automatically generating a network device name will require us to validate that there are no conflicts in the name we use. These implementation details belong within the scope of the implementation phase and PR discussion.
Consequences
Beta Was this translation helpful? Give feedback.
All reactions