Skip to content

Commit

Permalink
Remove broker resync period for ServiceImport and EndpointSlices
Browse files Browse the repository at this point in the history
This has proven to be problematic at larger scale, significantly
increasing latencies due to the rate limiting. It was put in to
easily handle a hypothetical, unlikely edge case where a service
namespace is deleted then recreated but the potential performance
hit to handle it in this manner isn't worth it. Now that the
resource syncer can watch namespaces, we can handle it there.

Fixes submariner-io#1623

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
  • Loading branch information
tpantelis committed Aug 27, 2024
1 parent 1aaa9dc commit 4ae50b5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion pkg/agent/controller/endpoint_slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func newEndpointSliceController(spec *AgentSpecification, syncerConfig broker.Sy
c.enqueueForConflictCheck(context.TODO(), obj.(*discovery.EndpointSlice), op)
return false
},
BrokerResyncPeriod: BrokerResyncPeriod,
},
}

Expand Down
1 change: 0 additions & 1 deletion pkg/agent/controller/service_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ func newServiceImportController(spec *AgentSpecification, syncerMetricNames Agen
Transform: controller.onRemoteServiceImport,
OnSuccessfulSync: controller.serviceImportMigrator.onSuccessfulSyncFromBroker,
Scheme: syncerConfig.Scheme,
ResyncPeriod: BrokerResyncPeriod,
NamespaceInformer: syncerConfig.NamespaceInformer,
SyncCounterOpts: &prometheus.GaugeOpts{
Name: syncerMetricNames.ServiceImportCounterName,
Expand Down
3 changes: 0 additions & 3 deletions pkg/agent/controller/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package controller

import (
"sync"
"time"

"github.com/submariner-io/admiral/pkg/federate"
"github.com/submariner-io/admiral/pkg/syncer"
Expand All @@ -42,8 +41,6 @@ const (
portConflictReason = "ConflictingPorts"
)

var BrokerResyncPeriod = time.Minute * 2

type EndpointSliceListerFn func(selector k8slabels.Selector) []runtime.Object

type converter struct {
Expand Down

0 comments on commit 4ae50b5

Please sign in to comment.