manager: initialize the required settings first
Initialize the required settings first.
Otherwise, the required setting CR will be created with empty default
value first which is not a valid value for the required setting.
@@ -142,10 +142,7 @@ func startManager(c *cli.Context) error {
monitoring.InitMonitoringSystem(logger, currentNodeID, ds, kubeconfigPath)
- if err := ds.InitSettings(); err != nil {
- return err
- }
-
+ // Initialize the required settings first
if err := updateDefaultImageSetting(m, types.SettingNameDefaultEngineImage, engineImage); err != nil {
return err
}
@@ -162,6 +159,11 @@ func startManager(c *cli.Context) error {
return err
}
+ // Initialize the rest settings
+ if err := ds.InitSettings(); err != nil {
+ return err
+ }
+
if err := updateRegistrySecretName(m); err != nil {
return err
}
