8000 fix: disable batch reload when batch finishes (#6446) · nginx/kubernetes-ingress@ea8e46b · GitHub
[go: up one dir, main page]

Skip to content

Commit ea8e46b

Browse files
darestejjngx
andauthored
fix: disable batch reload when batch finishes (#6446)
Co-authored-by: Jakub Jarosz <99677300+jjngx@users.noreply.github.com>
1 parent 0ca75be commit ea8e46b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/k8s/controller.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,7 @@ func (lbc *LoadBalancerController) sync(task task) {
916916
defer lbc.syncLock.Unlock()
917917
}
918918
if lbc.batchSyncEnabled && task.Kind != endpointslice {
919+
glog.V(3).Infof("Task is not endpointslice - enabling batch reload")
919920
lbc.enableBatchReload = true
920921
}
921922
switch task.Kind {
@@ -931,6 +932,7 @@ func (lbc *LoadBalancerController) sync(task task) {
931932
case endpointslice:
932933
resourcesFound := lbc.syncEndpointSlices(task)
933934
if lbc.batchSyncEnabled && resourcesFound {
935+
glog.V(3).Infof("Endpointslice %v is referenced - enabling batch reload", task.Key)
934936
lbc.enableBatchReload = true
935937
}
936938
case secret:
@@ -990,7 +992,8 @@ func (lbc *LoadBalancerController) sync(task task) {
990992
}
991993
}
992994

993-
glog.V(3).Infof("Batch sync completed")
995+
lbc.enableBatchReload = false
996+
glog.V(3).Infof("Batch sync completed - disabling batch reload")
994997
}
995998
}
996999

0 commit comments

Comments
 (0)
0