Skip to content

Commit

Permalink
fix: Add the configuration to meet the load cpu and memory usage. Sto…
Browse files Browse the repository at this point in the history
…p the recommendation
  • Loading branch information
liuqx committed Aug 24, 2023
2 parents 4e774d5 + ac623ef commit 2f6a705
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/recommendation/recommender/resource/recommend.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ func (rr *ResourceRecommender) Recommend(ctx *framework.RecommendationContext) e
cr.Target[corev1.ResourceMemory] = memQuantity.String()
}
cr.Target[corev1.ResourceMemory] = ""
if *memQuantity != c.Resources.Requests[corev1.ResourceMemory] {
cr.Target[corev1.ResourceMemory] = memQuantity.String()
}
}

newContainerSpec := corev1.Container{
Expand Down

0 comments on commit 2f6a705

Please sign in to comment.