wrong allocable memory

This commit is contained in:
GLYASAI 2021-05-27 14:08:11 +08:00
parent 1b9d4344f4
commit 7170af322d

View File

@ -493,7 +493,8 @@ func NewAllocMemory(ctx context.Context, statusCli *client.AppRuntimeSyncClient,
if err != nil {
return nil, err
}
am.allcm = util.Int64(tenantUsedResource.MemoryRequest)
allocm := tenant.LimitMemory - int(tenantUsedResource.MemoryLimit)
am.allcm = util.Int64(int64(allocm))
} else {
allcm, err := ClusterAllocMemory(ctx)
if err != nil {