From 0579840ef75d87cfd21bff86e3697c599329911b Mon Sep 17 00:00:00 2001 From: Zbynek Roubalik Date: Wed, 6 Jan 2021 13:33:15 +0100 Subject: [PATCH 1/2] fix object name reference when resolving pods Signed-off-by: Zbynek Roubalik --- pkg/scaling/scale_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/scaling/scale_handler.go b/pkg/scaling/scale_handler.go index 2da13d60e2a..22adf24f9af 100644 --- a/pkg/scaling/scale_handler.go +++ b/pkg/scaling/scale_handler.go @@ -377,7 +377,7 @@ func (h *scaleHandler) getPods(scalableObject interface{}) (*corev1.PodTemplateS // Try to get a real object instance for better cache usage, but fall back to an Unstructured if needed. podTemplateSpec := corev1.PodTemplateSpec{} gvk := obj.Status.ScaleTargetGVKR.GroupVersionKind() - objKey := client.ObjectKey{Namespace: obj.Namespace, Name: obj.Status.ScaleTargetGVKR.Resource} + objKey := client.ObjectKey{Namespace: obj.Namespace, Name: obj.Spec.ScaleTargetRef.Name} switch { // For core types, use a typed client so we get an informer-cache-backed Get to reduce API load. case gvk.Group == "apps" && gvk.Kind == "Deployment": From 940bfd21dc1b313f56a57fd2176658f881fb1640 Mon Sep 17 00:00:00 2001 From: Zbynek Roubalik Date: Wed, 6 Jan 2021 13:48:15 +0100 Subject: [PATCH 2/2] update changelog Signed-off-by: Zbynek Roubalik --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2acefe8ac9c..99780c85bff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,7 @@ - Optimize Kafka scaler's `getLagForPartition` function. ([#1464](https://github.com/kedacore/keda/pull/1464)) - Reduce unnecessary /scale requests from ScaledObject controller ([#1453](https://github.com/kedacore/keda/pull/1453)) - Add support for the WATCH_NAMESPACE environment variable to the operator ([#1474](https://github.com/kedacore/keda/pull/1474)) -- Automatically determine the RabbitMQ protocol when possible, and support setting the protocl via TriggerAuthentication ([#1459](https://github.com/kedacore/keda/pulls/1459)) +- Automatically determine the RabbitMQ protocol when possible, and support setting the protocl via TriggerAuthentication ([#1459](https://github.com/kedacore/keda/pulls/1459),[#1483](https://github.com/kedacore/keda/pull/1483)) - Improve performance when fetching pod information ([#1457](https://github.com/kedacore/keda/pull/1457)) ### Breaking Changes