Skip to content

Commit 497f376

Browse files
authored
pkg/epp: use labels.Equals for label comparison (#2015)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
1 parent 36ca5ab commit 497f376

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/epp/datastore/datastore.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"errors"
2222
"fmt"
2323
"net"
24-
"reflect"
2524
"strconv"
2625
"sync"
2726

@@ -142,7 +141,8 @@ func (ds *datastore) PoolSet(ctx context.Context, reader client.Reader, endpoint
142141

143142
oldEndpointPool := ds.pool
144143
ds.pool = endpointPool
145-
if oldEndpointPool == nil || !reflect.DeepEqual(oldEndpointPool.Selector, endpointPool.Selector) {
144+
145+
if oldEndpointPool == nil || !labels.Equals(oldEndpointPool.Selector, endpointPool.Selector) {
146146
logger.V(logutil.DEFAULT).Info("Updating endpoints", "selector", endpointPool.Selector)
147147
// A full resync is required to address two cases:
148148
// 1) At startup, the pod events may get processed before the pool is synced with the datastore,

0 commit comments

Comments
 (0)