fix: do not shadow the trigger variable
This commit is contained in:
@@ -606,24 +606,26 @@ func getAutoscaling(input GetAutoscalingInput) (ProcessAutoscaling, error) {
|
|||||||
if trigger.Name == "" {
|
if trigger.Name == "" {
|
||||||
trigger.Name = fmt.Sprintf("trigger-%s-%d", trigger.Type, idx+1)
|
trigger.Name = fmt.Sprintf("trigger-%s-%d", trigger.Type, idx+1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
autoscalingTrigger := ProcessAutoscalingTrigger{
|
||||||
Name: trigger.Name,
|
Name: trigger.Name,
|
||||||
Type: trigger.Type,
|
Type: trigger.Type,
|
||||||
Metadata: metadata,
|
Metadata: metadata,
|
||||||
}
|
}
|
||||||
|
|
||||||
if auth, ok := input.KedaValues.Authentications[trigger.Type]; ok {
|
if auth, ok := input.KedaValues.Authentications[trigger.Type]; ok {
|
||||||
trigger.AuthenticationRef = &ProcessAutoscalingTriggerAuthenticationRef{
|
autoscalingTrigger.AuthenticationRef = &ProcessAutoscalingTriggerAuthenticationRef{
|
||||||
Name: auth.Name,
|
Name: auth.Name,
|
||||||
Kind: string(auth.Kind),
|
Kind: string(auth.Kind),
|
||||||
}
|
}
|
||||||
} else if auth, ok := input.KedaValues.GlobalAuthentications[trigger.Type]; ok {
|
} else if auth, ok := input.KedaValues.GlobalAuthentications[trigger.Type]; ok {
|
||||||
trigger.AuthenticationRef = &ProcessAutoscalingTriggerAuthenticationRef{
|
autoscalingTrigger.AuthenticationRef = &ProcessAutoscalingTriggerAuthenticationRef{
|
||||||
Name: auth.Name,
|
Name: auth.Name,
|
||||||
Kind: string(auth.Kind),
|
Kind: string(auth.Kind),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
triggers = append(triggers, trigger)
|
triggers = append(triggers, autoscalingTrigger)
|
||||||
}
|
}
|
||||||
|
|
||||||
autoscaling := ProcessAutoscaling{
|
autoscaling := ProcessAutoscaling{
|
||||||
|
|||||||
Reference in New Issue
Block a user