Skip to content

Commit

Permalink
Update scrapers/kubernetes/informers.go
Browse files Browse the repository at this point in the history
Co-authored-by: Moshe Immerman <moshe@flanksource.com>
  • Loading branch information
adityathebe and moshloop committed Dec 5, 2024
1 parent 6a8a300 commit c3727eb
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions scrapers/kubernetes/informers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c3727eb

Please sign in to comment.