Merge pull request #2118 from bskiba/fix-nopods

Mark pods matched if we find matching aggregation on VPA creation
This commit is contained in:
Kubernetes Prow Robot 2019-06-11 10:16:21 -07:00 committed by GitHub
commit 48c6ebbcaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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