Skip to content

Commit

Permalink
fix: only add triggerAuth to scaled objects when there is an actual v…
Browse files Browse the repository at this point in the history
…alue to reference (#3943)

Signed-off-by: Calum Murray <[email protected]>
Co-authored-by: Calum Murray <[email protected]>
  • Loading branch information
knative-prow-robot and Cali0707 authored Jul 4, 2024
1 parent e79e5df commit e77b72c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions control-plane/pkg/autoscaler/keda/keda.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e77b72c

Please sign in to comment.