From 0de6e605dcd2f21db14f8dfe2cf6717b8e77c53f Mon Sep 17 00:00:00 2001 From: Joseph Burnett Date: Fri, 2 Feb 2018 17:14:31 -0500 Subject: [PATCH] Specify the APIVersion of the autoscaler target. Autoscaling was broken because the horizontal pod autoscaler was unable to find the deployment. --- pkg/controller/revision/ela_autoscaler.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/controller/revision/ela_autoscaler.go b/pkg/controller/revision/ela_autoscaler.go index 8912c83c8d83..095a7ddcbbfc 100644 --- a/pkg/controller/revision/ela_autoscaler.go +++ b/pkg/controller/revision/ela_autoscaler.go @@ -43,8 +43,9 @@ func MakeElaAutoscaler(u *v1alpha1.Revision, namespace string) *autoscaling_v1.H }, Spec: autoscaling_v1.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling_v1.CrossVersionObjectReference{ - Kind: "Deployment", - Name: util.GetRevisionDeploymentName(u), + APIVersion: "extensions/v1beta1", + Kind: "Deployment", + Name: util.GetRevisionDeploymentName(u), }, MinReplicas: &min, MaxReplicas: int32(max),