From 641b155f62fab4afebe45eefebc75a7d1ba9a34d Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" Date: Fri, 15 Sep 2023 16:36:53 -0500 Subject: [PATCH] delete instead of tracking nothing --- internal/mesh/internal/controllers/xds/controller.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/mesh/internal/controllers/xds/controller.go b/internal/mesh/internal/controllers/xds/controller.go index 5368efc48b595..604181a49e188 100644 --- a/internal/mesh/internal/controllers/xds/controller.go +++ b/internal/mesh/internal/controllers/xds/controller.go @@ -202,6 +202,9 @@ func (r *xdsReconciler) Reconcile(ctx context.Context, rt controller.Runtime, re // Step 4: Track relationships between ProxyStateTemplates and ServiceEndpoints. r.endpointsMapper.TrackItem(req.ID, endpointsInProxyStateTemplate) + if len(endpointsInProxyStateTemplate) == 0 { + r.endpointsMapper.UntrackItem(req.ID) + } // Iterate through leaf certificate references. // For each leaf certificate reference, the controller should: