Skip to content

Commit

Permalink
Merge pull request kubernetes#2314 from cezarygerard/master
Browse files Browse the repository at this point in the history
service_creation_latency: limit number of calls, exit on success
  • Loading branch information
k8s-ci-robot committed Sep 19, 2023
2 parents 1f0a1bd + d41a429 commit e353d7c
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const (
defaultServiceCreationLatencyTimeout = 10 * time.Minute
defaultCheckInterval = 10 * time.Second
pingBackoff = 1 * time.Second
pingChecks = 10
pingChecks = 3

creatingPhase = "creating"
ipAssigningPhase = "ipAssigning"
Expand Down Expand Up @@ -351,9 +351,6 @@ func (p *pingChecker) run() {
case <-p.stopCh:
return
default:
if _, exists := p.creationTimes.Get(key, phaseName(reachabilityPhase, p.svc.Spec.Type)); exists {
return
}
// TODO(#685): Make ping checks less communication heavy.
pod, err := execservice.GetPod()
if err != nil {
Expand Down Expand Up @@ -393,6 +390,7 @@ func (p *pingChecker) run() {
success++
if success == pingChecks {
p.creationTimes.Set(key, phaseName(reachabilityPhase, p.svc.Spec.Type), time.Now())
return
}
}
}
Expand Down

0 comments on commit e353d7c

Please sign in to comment.