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 872d64b commit 4f43d4aCopy full SHA for 4f43d4a
internal/ingress/controller/nginx.go
@@ -400,12 +400,18 @@ func (n *NGINXController) stopWait() {
400
var scraper collectors.NginxStatusScraper
401
lastRequests := 0
402
noChangeTimes := 0
403
+ failures := 0
404
+ const failureThreshold = 5
405
406
for ; ; time.Sleep(checkFrequency) {
407
st, err := scraper.Scrape()
408
if err != nil {
409
klog.Warningf("failed to scrape nginx status: %v", err)
- noChangeTimes = 0
410
+ failures++
411
+ if failures >= failureThreshold {
412
+ klog.Warningf("giving up graceful shutdown: too many nginx status scrape failures")
413
+ break
414
+ }
415
continue
416
}
417
0 commit comments