From 0134cd98d03feb8e2c334a2b60912040ade7f154 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 8 Mar 2024 05:23:50 -0500 Subject: [PATCH] fix: correct issue where ClusterTriggerAuthentication objects were filtered based on prefix The prefix no longer matters since they are global to the cluster. --- plugins/scheduler-k3s/functions.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/scheduler-k3s/functions.go b/plugins/scheduler-k3s/functions.go index ac30f5626..4d73b4cef 100644 --- a/plugins/scheduler-k3s/functions.go +++ b/plugins/scheduler-k3s/functions.go @@ -700,15 +700,10 @@ func getKedaValues(ctx context.Context, clientset KubernetesClient, appName stri globalAuths := map[string]KedaAuthentication{} for _, item := range items { - if !strings.HasPrefix(item.Name, "global-auth-") { - continue - } - - authType := strings.TrimPrefix(item.Name, "global-auth-") - globalAuths[authType] = KedaAuthentication{ + globalAuths[item.Name] = KedaAuthentication{ Name: item.Name, Kind: KedaAuthenticationKind_ClusterTriggerAuthentication, - Type: authType, + Type: item.Name, } }