Merge pull request #112335 from piotrnosek/fixcustomcrd

Fix HPA E2E CustomResourceDefinition test
This commit is contained in:
Kubernetes Prow Robot
2022-09-22 11:01:06 -07:00
committed by GitHub
6 changed files with 237 additions and 32 deletions

View File

@@ -246,7 +246,6 @@ func (a *HorizontalController) processNextWorkItem(ctx context.Context) bool {
// all metrics computed.
func (a *HorizontalController) computeReplicasForMetrics(ctx context.Context, hpa *autoscalingv2.HorizontalPodAutoscaler, scale *autoscalingv1.Scale,
metricSpecs []autoscalingv2.MetricSpec) (replicas int32, metric string, statuses []autoscalingv2.MetricStatus, timestamp time.Time, err error) {
if scale.Status.Selector == "" {
errMsg := "selector is required"
a.eventRecorder.Event(hpa, v1.EventTypeWarning, "SelectorRequired", errMsg)