Skip to content

Commit

Permalink
reduce readiness failure threshold (#401)
Browse files Browse the repository at this point in the history
* reduce readiness failure threshold
---------

Co-authored-by: Alexey Kazakov <[email protected]>
  • Loading branch information
mfrancisc and alexeykazakov authored Feb 12, 2024
1 parent 75f17d8 commit 2604ab6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"errors"
"fmt"
"net/http"
"os"
Expand Down Expand Up @@ -139,7 +140,11 @@ func main() {
log.Infof(nil, "Service Revision %s built on %s", configuration.Commit, configuration.BuildTime)
log.Infof(nil, "Listening on %q...", configuration.HTTPAddress)
if err := srv.HTTPServer().ListenAndServe(); err != nil {
log.Error(nil, err, err.Error())
if errors.Is(err, http.ErrServerClosed) {
log.Info(nil, fmt.Sprintf("%s - this is expected when server shutdown has been initiated", err.Error()))
} else {
log.Error(nil, err, err.Error())
}
}
}()

Expand Down
2 changes: 1 addition & 1 deletion deploy/registration-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ objects:
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
failureThreshold: 30
failureThreshold: 1
httpGet:
path: /api/v1/health
port: 8080
Expand Down

0 comments on commit 2604ab6

Please sign in to comment.