Skip to content

Commit 2f6a705

Browse files
author
liuqx
committed
fix: Add the configuration to meet the load cpu and memory usage. Stop the recommendation
2 parents 4e774d5 + ac623ef commit 2f6a705

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/recommendation/recommender/resource/recommend.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ func (rr *ResourceRecommender) Recommend(ctx *framework.RecommendationContext) e
187187
cr.Target[corev1.ResourceMemory] = memQuantity.String()
188188
}
189189
cr.Target[corev1.ResourceMemory] = ""
190+
if *memQuantity != c.Resources.Requests[corev1.ResourceMemory] {
191+
cr.Target[corev1.ResourceMemory] = memQuantity.String()
192+
}
190193
}
191194

192195
newContainerSpec := corev1.Container{

0 commit comments

Comments
 (0)