diff --git a/control-plane/pkg/autoscaler/keda/keda.go b/control-plane/pkg/autoscaler/keda/keda.go index 9aadbc9101..e4fc1537a1 100644 --- a/control-plane/pkg/autoscaler/keda/keda.go +++ b/control-plane/pkg/autoscaler/keda/keda.go @@ -77,13 +77,14 @@ func GenerateScaleTriggers(cg *kafkainternals.ConsumerGroup, triggerAuthenticati } trigger := kedav1alpha1.ScaleTriggers{ - Type: "kafka", - Metadata: triggerMetadata, - AuthenticationRef: &kedav1alpha1.ScaledObjectAuthRef{}, + Type: "kafka", + Metadata: triggerMetadata, } if triggerAuthentication != nil { - trigger.AuthenticationRef.Name = triggerAuthentication.Name + trigger.AuthenticationRef = &kedav1alpha1.ScaledObjectAuthRef{ + Name: triggerAuthentication.Name, + } } triggers = append(triggers, trigger)