From c3727ebab4a05d02ccacb905110e988609fafc70 Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Thu, 5 Dec 2024 13:31:50 +0545 Subject: [PATCH] Update scrapers/kubernetes/informers.go Co-authored-by: Moshe Immerman --- scrapers/kubernetes/informers.go | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/scrapers/kubernetes/informers.go b/scrapers/kubernetes/informers.go index 34b41465..8b30cd39 100644 --- a/scrapers/kubernetes/informers.go +++ b/scrapers/kubernetes/informers.go @@ -386,11 +386,24 @@ func pqCompareOperation(a, b QueueItemOperation) int { func pqCompareKind(a, b string) int { // smaller means earlier in the queue priority := map[string]int{ - "Namespace": 1, - "Deployment": 2, - "ReplicaSet": 3, - "Pod": 4, - "Event": 5, + "Namespace": 1, + "Deployment": 2, + "StatefulSet": 2, + "DaemonSet": 2, + "Service": 2, + "ClusterRole": 2, + "Role": 2, + "HelmChart": 2, + "HelmRepository": 2, + "OCIRepository": 2, + "ClusterRoleBinding": 3, + "RoleBinding": 3, + "Endpoints": 3, + "CronJob": 3, + "Job": 3, + "ReplicaSet": 3, + "Pod": 4, + "Event": 5, } pa := lo.CoalesceOrEmpty(priority[a], 3)