Skip to content

Commit c14280e

Browse files
committed
prevent blocking wait in cert reloading
1 parent 9bd2912 commit c14280e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates/configmap_cafile_content.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ func (c *ConfigMapCAController) Run(workers int, stopCh <-chan struct{}) {
217217
go wait.Until(c.runWorker, time.Second, stopCh)
218218

219219
// start timer that rechecks every minute, just in case. this also serves to prime the controller quickly.
220-
_ = wait.PollImmediateUntil(FileRefreshDuration, func() (bool, error) {
220+
go wait.PollImmediateUntil(FileRefreshDuration, func() (bool, error) {
221221
c.queue.Add(workItemKey)
222222
return false, nil
223223
}, stopCh)

staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_cafile_content.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func (c *DynamicFileCAContent) Run(workers int, stopCh <-chan struct{}) {
170170
go wait.Until(c.runWorker, time.Second, stopCh)
171171

172172
// start timer that rechecks every minute, just in case. this also serves to prime the controller quickly.
173-
_ = wait.PollImmediateUntil(FileRefreshDuration, func() (bool, error) {
173+
go wait.PollImmediateUntil(FileRefreshDuration, func() (bool, error) {
174174
c.queue.Add(workItemKey)
175175
return false, nil
176176
}, stopCh)

staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_serving_content.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func (c *DynamicFileServingContent) Run(workers int, stopCh <-chan struct{}) {
133133
go wait.Until(c.runWorker, time.Second, stopCh)
134134

135135
// start timer that rechecks every minute, just in case. this also serves to prime the controller quickly.
136-
_ = wait.PollImmediateUntil(FileRefreshDuration, func() (bool, error) {
136+
go wait.PollImmediateUntil(FileRefreshDuration, func() (bool, error) {
137137
c.queue.Add(workItemKey)
138138
return false, nil
139139
}, stopCh)

0 commit comments

Comments
 (0)