parent
e277df0063
commit
e9c1c1cc26
|
|
@ -56,8 +56,8 @@ func (c *cappingRecommendationProcessor) Apply(
|
|||
pod *apiv1.Pod) (*vpa_types.RecommendedPodResources, ContainerToAnnotationsMap, error) {
|
||||
// TODO: Annotate if request enforced by maintaining proportion with limit and allowed limit range is in conflict with policy.
|
||||
|
||||
policy := vpa.Spec.ResourcePolicy.DeepCopy()
|
||||
podRecommendation := vpa.Status.Recommendation.DeepCopy()
|
||||
policy := vpa.Spec.ResourcePolicy
|
||||
podRecommendation := vpa.Status.Recommendation
|
||||
|
||||
if podRecommendation == nil && policy == nil {
|
||||
// If there is no recommendation and no policies have been defined then no recommendation can be computed.
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ type fakeProcessor struct {
|
|||
|
||||
func (p *fakeProcessor) Apply(vpa *vpa_types.VerticalPodAutoscaler,
|
||||
pod *v1.Pod) (*vpa_types.RecommendedPodResources, ContainerToAnnotationsMap, error) {
|
||||
result := vpa.Status.Recommendation.DeepCopy()
|
||||
result := vpa.Status.Recommendation
|
||||
result.ContainerRecommendations[0].ContainerName += p.message
|
||||
containerToAnnotationsMap := ContainerToAnnotationsMap{"trace": []string{p.message}}
|
||||
return result, containerToAnnotationsMap, nil
|
||||
|
|
|
|||
Loading…
Reference in New Issue