Open gbraad opened 1 year ago
This should be considered as a spike as this is not proven to be a solution yet.
An alternative could be single file with an array of preset-specific values:
{
"preset": "openshift",
"vm-config": [
"microshift": {
"memory": "6"
},
"openshift": {
"disk-size": "..."
},
]
}
With viper separate preset files taking precedence over the main one might be easier to implement though.
changing to read a file by name sounds easier than adding logic to handle the array. you would like this eventually to be 'exchangeable' maybe?
At the moment, we store our configuration in
crc.json
, which is unaware of preset specific changes. It stores all the values (eg. 16G of memory) in a single file, and when moved from OpenShift to Microshift, this might mean we assign a lot more memory to this instance as it assign 16G that was given for OpenShift.We could keep
crc.json
to store the general configuration, but a specific file for preset-based values, such asmemory
,cpus
,disksize
andbundle
. This can be stored ascrc-[preset].json
(eg.crc-microshift.json
) and when switched we therefore preserve these specific configuration options.crc.json
crc-openshift.json
crc-microshift.json