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 #1623

Signed-off-by: Tom Pantelis <[email protected]>
  • Loading branch information
tpantelis committed Aug 26, 2024
1 parent 8fd72b9 commit 954d6fd
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions pkg/agent/controller/controller_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ func init() {
if err != nil {
panic(err)
}

controller.BrokerResyncPeriod = time.Millisecond * 100
}

func TestController(t *testing.T) {
Expand Down
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 @@ -98,7 +98,6 @@ func newServiceImportController(spec *AgentSpecification, syncerMetricNames Agen
Transform: controller.onRemoteServiceImport,
OnSuccessfulSync: controller.serviceImportMigrator.onSuccessfulSyncFromBroker,
Scheme: syncerConfig.Scheme,
ResyncPeriod: BrokerResyncPeriod,
SyncCounterOpts: &prometheus.GaugeOpts{
Name: syncerMetricNames.ServiceImportCounterName,
Help: "Count of imported services",
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 @@ -40,8 +39,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 954d6fd

Please sign in to comment.