Only parse memory if set

pull/6987/head
Thomas Stromberg 2020-03-10 16:44:50 -07:00
parent 4788b75fcf
commit f1d2127498
1 changed files with 1 additions and 1 deletions

View File

@ -868,7 +868,7 @@ func generateCfgFromFlags(cmd *cobra.Command, k8sVersion string, drvName string)
}
mem := suggestMemoryAllocation(sysLimit, containerLimit)
if viper.GetString(memory) != "" {
if cmd.Flags().Changed(memory) {
mem = pkgutil.CalculateSizeInMB(viper.GetString(memory))
} else {
glog.Infof("Using suggested %dMB memory alloc based on sys=%dMB, container=%dMB", mem, sysLimit, containerLimit)