We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d1d551 commit 2e211efCopy full SHA for 2e211ef
npm/pkg/dataplane/dataplane.go
@@ -216,6 +216,14 @@ func (dp *DataPlane) ApplyDataPlane() error {
216
217
// NOTE: ideally we won't refresh Pod Endpoints if the updatePodCache is empty
218
if dp.shouldUpdatePod() {
219
+ // do not refresh endpoints if the updatePodCache is empty
220
+ dp.updatePodCache.Lock()
221
+ if len(dp.updatePodCache.cache) == 0 {
222
+ dp.updatePodCache.Unlock()
223
+ return nil
224
+ }
225
226
+
227
err := dp.refreshPodEndpoints()
228
if err != nil {
229
metrics.SendErrorLogAndMetric(util.DaemonDataplaneID, "[DataPlane] failed to refresh endpoints while updating pods. err: [%s]", err.Error())
0 commit comments