forked from crc-org/crc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: use config notifier to call UpdateDefaults()
There are calls to config.UpdateDefaults in pkg/crc/api/ to reload the configuration settings every time a config is set/unset. This ensures the default cpus/memory values are correct when the preset changes. Then there is code in pkg/crc/config.Set()/Unset() to reset the cpus/memory values when the preset changes if they are out of spec. This commit groups in UpdateDefaults all the work that is needed when the preset changes. It moves the Set/Unset UpdateDefaults calls from pkg/crc/api to pkg/crc/config This should fix crc-org#3652
- Loading branch information
Showing
2 changed files
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters