Skip to content

Commit

Permalink
Implement Watch Namespaces
Browse files Browse the repository at this point in the history
Relates to envoyproxy#1117

Signed-off-by: Arko Dasgupta <[email protected]>
  • Loading branch information
arkodg committed Jun 30, 2023
1 parent 81cdde6 commit 108f219
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/provider/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ func New(cfg *rest.Config, svr *config.Server, resources *message.ProviderResour
LeaderElectionID: "5b9825d2.gateway.envoyproxy.io",
MetricsBindAddress: ":8080",
}

if (svr.EnvoyGateway.Provider.Kubernetes.Watch != nil) && (len(svr.EnvoyGateway.Provider.Kubernetes.Watch.Namespaces) > 0) {
mgrOpts.Cache.Namespaces = svr.EnvoyGateway.Provider.Kubernetes.Watch.Namespaces
}

mgr, err := ctrl.NewManager(cfg, mgrOpts)
if err != nil {
return nil, fmt.Errorf("failed to create manager: %w", err)
Expand Down

0 comments on commit 108f219

Please sign in to comment.