Skip to content

Commit b3e9849

Browse files
authored
refactor(controller) remove a no-op sort of ingresses
Delete code that instantiates a list of ingresses from Store, sorts the list in place, and then discards that list. From Kong#828
1 parent 82b2332 commit b3e9849

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

internal/ingress/controller/controller.go

-9
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package controller
1919
import (
2020
"context"
2121
"fmt"
22-
"sort"
2322
"sync"
2423
"sync/atomic"
2524
"time"
@@ -112,14 +111,6 @@ func (n *KongController) syncIngress(interface{}) error {
112111
return nil
113112
}
114113

115-
// Sort ingress rules using the ResourceVersion field
116-
ings := n.store.ListIngresses()
117-
sort.SliceStable(ings, func(i, j int) bool {
118-
ir := ings[i].ResourceVersion
119-
jr := ings[j].ResourceVersion
120-
return ir < jr
121-
})
122-
123114
n.Logger.Infof("syncing configuration")
124115
state, err := parser.Build(n.Logger.WithField("component", "store"), n.store)
125116
if err != nil {

0 commit comments

Comments
 (0)