Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmd/epp/runner/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ func (s *healthServer) Check(ctx context.Context, in *healthPb.HealthCheckReques
case ReadinessCheckService:
checkName = "readiness"
isPassing = isLive && s.isLeader.Load()
case LivenessCheckService, "": // Default to liveness check if service is empty
case "": // Handle overall server health for load balancers that use an empty service name.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very very minor, non-blocking nit: move the empty string case to the bottom of the list

checkName = "empty service name (considered as overall health)"
// The overall health for a load balancer should reflect readiness to accept traffic,
// which is true only for the leader pod that has synced its data.
isPassing = isLive && s.isLeader.Load()
case LivenessCheckService:
checkName = "liveness"
// Any pod that is running and can respond to this gRPC check is considered "live".
// The datastore sync status should not affect liveness, only readiness.
Expand Down