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 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":