Skip to content

Commit 69403c9

Browse files
committed
expose xds cache
Change-Id: I5dde4c3fe59fe2f1d5d57893b0e121f9abfdf35e
1 parent 054f0f6 commit 69403c9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/gateway/controller.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ type Controller struct {
6969
grpcroutequeue workqueue.TypedRateLimitingInterface[string]
7070

7171
// envoyproxy control plane
72+
xdscache envoyproxycache.SnapshotCache
7273
xdsserver envoyproxyserver.Server
7374
xdsLocalAddress string
7475
xdsLocalPort int
@@ -271,8 +272,8 @@ func (c *Controller) Run(ctx context.Context) error {
271272

272273
klog.Info("Starting Envoy proxy controller")
273274
// Create a cache
274-
envoycache := envoyproxycache.NewSnapshotCache(false, envoyproxycache.IDHash{}, nil)
275-
c.xdsserver = envoyproxyserver.NewServer(ctx, envoycache, nil)
275+
c.xdscache = envoyproxycache.NewSnapshotCache(false, envoyproxycache.IDHash{}, nil)
276+
c.xdsserver = envoyproxyserver.NewServer(ctx, c.xdscache, nil)
276277

277278
var grpcOptions []grpc.ServerOption
278279
grpcOptions = append(grpcOptions,

0 commit comments

Comments
 (0)