Skip to content

Commit

Permalink
Merge pull request #55356 from ericchiang/cert-manager-reduce-backoff
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 54773, 52523, 47497, 55356, 49429). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

certificate manager: reduce max backoff from 128s to 32s

For TLS bootstrapping in bootkube we run a kubelet with a control plane run through static pods. That static control plane has an API server and controller manager that approve the kubelet's CSR.

Since the kubelet has to wait for the static control plane to come up to be approved, we hit this backoff every time and it actually adds a notable overhead to startup times.

kubernetes-retired/bootkube#663

If this choice is somewhat arbitrary, I'd like to see it lowered for 1.9.

/assign @jcbsmpsn @mikedanese

```release-note
NONE
```

Kubernetes-commit: 0ff21718d127b9fc14bdfc068624e82fb84e99c2
  • Loading branch information
k8s-publish-robot committed Nov 9, 2017
2 parents f72118d + 25ba7d7 commit 8d2eb60
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 57 deletions.
110 changes: 55 additions & 55 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions util/certificate/certificate_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,15 @@ func (m *manager) Start() {
Duration: 2 * time.Second,
Factor: 2,
Jitter: 0.1,
Steps: 7,
Steps: 5,
}
go wait.Forever(func() {
sleepInterval := m.rotationDeadline.Sub(time.Now())
glog.V(2).Infof("Waiting %v for next certificate rotation", sleepInterval)
time.Sleep(sleepInterval)
if err := wait.ExponentialBackoff(backoff, m.rotateCerts); err != nil {
utilruntime.HandleError(fmt.Errorf("Reached backoff limit, still unable to rotate certs: %v", err))
wait.PollInfinite(128*time.Second, m.rotateCerts)
wait.PollInfinite(32*time.Second, m.rotateCerts)
}
}, 0)
}
Expand Down

0 comments on commit 8d2eb60

Please sign in to comment.