Merge pull request #2118 from bskiba/fix-nopods
Mark pods matched if we find matching aggregation on VPA creation
This commit is contained in:
commit
48c6ebbcaa
|
|
@ -236,7 +236,9 @@ func (cluster *ClusterState) AddOrUpdateVpa(apiObject *vpa_types.VerticalPodAuto
|
|||
vpa = NewVpa(vpaID, selector, apiObject.CreationTimestamp.Time)
|
||||
cluster.Vpas[vpaID] = vpa
|
||||
for aggregationKey, aggregation := range cluster.aggregateStateMap {
|
||||
vpa.UseAggregationIfMatching(aggregationKey, aggregation)
|
||||
if vpa.UseAggregationIfMatching(aggregationKey, aggregation) {
|
||||
cluster.VpasWithMatchingPods[vpa.ID] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
vpa.TargetRef = apiObject.Spec.TargetRef
|
||||
|
|
|
|||
Loading…
Reference in New Issue