-
Notifications
You must be signed in to change notification settings - Fork 624
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
Implement support for global default.yaml and override.yaml configs #436
Implement support for global default.yaml and override.yaml configs #436
Conversation
224a03e
to
c30b563
Compare
Maybe we want to support multiple override yamls? |
Can you explain the use case? |
I was thinking that splitting the override yaml into multiple files may increase readability of the yamls, but we can revisit that later. |
Looks good after adding docs and tests. |
I think the overrides or defaults will typically be very small, so splitting them into multiple files doesn't make that much sense. The one exception would be provisioning and probe scripts. But I think a better solution for those would be to allow them to be filename references and not require them to be inlined into the YAML file. That would allow you to use a proper "shell" mode for editing them, and also enables running So yeah, we can revisit later, but I don't expect that there will be a need for this. However, what we will need eventually is a per-instance override that will be stored inside the instance directory, and can be used to store modified setting specified e.g. via |
b3a7d58
to
87ddd43
Compare
@AkihiroSuda PTAL, I think it is basically done now |
87ddd43
to
213d22a
Compare
Sorry, pushed one more update to allow "merging" of networks using The docs at the bottom of |
Stored inside the _config directory, they provide defaults for all instances stored under the same LIMA_HOME. Settings from override.yaml take precedence over the instance settings themselves. Signed-off-by: Jan Dubois <[email protected]>
213d22a
to
7e24403
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.
Thanks
Stored inside the
_config
directory, they provide defaults for all instances stored under the sameLIMA_HOME
. Settings fromoverride.yaml
take precedence over the instance settings themselves:This make the home mount writable, adds a second mount point (because I have symlinks that point to an SSD array), and adds a vmnet IP address to every instance I start, without me having to modify the
examples/*.yaml
file when I create the instance.The settings could have been in
_config/default.yaml
too, except making~
writable wouldn't work because we make it explicitly readonly in our sample configs.This mechanism also allows users of Rancher Desktop or Colima to modify the config of the embedded instance without worrying about getting their customizations wiped during app updates, or instance restarts.
Still needs polishing and more testing (and updating the docs), but otherwise fully functional, so please give some feedback!