-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Default volumes and images when versions set #3
Conversation
5fd1e88
to
2a18e5c
Compare
@richardcase what do you think of this idea? Connected PRs |
2a18e5c
to
3937a5c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love all the little pieces of this PR. The tests, the github action, the simplifications or newVM
... all of it.
😊 very sweet review, BUT i have just seen one thing that is wrong, and one thing which I could probably name better 😅 |
Actually... I think I have changed my mind about having this feature. The kernel and os paths get harder to predict the more variation we add. For example, there is a Also the validation to make sure various fields are set correctly exists somewhere else, which just seems brittle to me and something we are likely to forget or be confused about later. Honestly this feature was just a 'nice to have', and now feels more like a 'pain in the ass to have'. Most users likely will not be harmed by having to specify things in yaml and it is probably better to have less magic going on anyway. I think I want to keep all the refactoring I did and remove the new bits, wdyt @yitsushi ? |
When users only set the `KernelVersion` and `OsVersion` fields, we fill in the other fields required by flintlock based on those values. For example, if given ```yaml spec: template: spec: kernelVersion: 5.10.77 osVersion: 1.23.5 ``` We fill in the rest with: ```yaml spec: template: spec: rootVolume: id: root image: ghcr.io/weaveworks-liquidmetal/capmvm-kubernetes:1.23.5 kernel: filename: "boot/vmlinux" image: ghcr.io/weaveworks-liquidmetal/kernel-bin:5.10.77 additionalVolumes: - id: modules image: ghcr.io/weaveworks-liquidmetal/kernel-modules:5.10.77 mountPoint: /lib/modules/5.10.77 ``` `convertToFlintlockAPI` has also been refactored to make it easier to read, and tests have been added.
3937a5c
to
847fb4a
Compare
That's what I wanted to suggest too after I read the title of the notification: "Actually... I think I have changed my mind about having this feature."
That's an interesting topic, this issue exists without this patch, someone tries to use firecracker images for cloudhypervisor. I know that's user error, but it's getting more and more complicated. I don't know a solution to that, but would be nice if we can add some constraints, for example Flintlock services report back what provider they are configured to use, and accept specs for that platform only and reject everything else (just a quick example/idea without thinking too much). |
Closing. Revert needed here: #6 |
When users only set the
KernelVersion
andOsVersion
fields, we fill in the other fields required by flintlock based on those values.For example, if given
We fill in the rest with:
convertToFlintlockAPI
has also been refactored to make it easier to read, and tests have been added.Part of liquidmetal-dev/cluster-api-provider-microvm#226
Follows #2