Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
omris94 committed Oct 13, 2024
1 parent 8f8beeb commit 65aa4d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mapper/pkg/kubefinder/kubefinder.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const (
IstioCanonicalNameLabelKey = "service.istio.io/canonical-name"
apiServerName = "kubernetes"
apiServerNamespace = "default"
seenIPsCacheSize = 2000
seenIPsCacheTTL = time.Minute * 10
)

type KubeFinder struct {
Expand Down Expand Up @@ -59,7 +61,7 @@ func NewKubeFinder(ctx context.Context, mgr manager.Manager) (*KubeFinder, error
}

func (k *KubeFinder) initSeenIPsCache() {
k.seenIPsTTLCache = expirable.NewLRU[string, struct{}](2000, nil, time.Minute*10)
k.seenIPsTTLCache = expirable.NewLRU[string, struct{}](seenIPsCacheSize, nil, seenIPsCacheTTL)
}

func (k *KubeFinder) initIndexes(ctx context.Context) error {
Expand Down

0 comments on commit 65aa4d2

Please sign in to comment.