File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ import (
6666
6767const (
6868 JitterFactor = 1.2
69- releaseTimeout = 15 * time .Second
69+ releaseTimeout = 10 * time .Second
7070)
7171
7272// NewLeaderElector creates a LeaderElector from a LeaderElectionConfig
Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ import (
1919 "k8s.io/client-go/tools/leaderelection/resourcelock"
2020)
2121
22+ const (
23+ kubeLockerReleaseTimeout = 10 * time .Second
24+ )
25+
2226// Locker is an interface for structs that can acquire and release locks.
2327type Locker interface {
2428 // Acquire acquires the lock with the provided name.
@@ -192,7 +196,7 @@ func (k *KubeLocker) Release(name string) error {
192196 log .Infof ("Waiting for lock to be released" )
193197 releaseCtx , releaseCancel := context .WithTimeout (
194198 context .Background (),
195- 10 * time . Second ,
199+ kubeLockerReleaseTimeout ,
196200 )
197201 defer releaseCancel ()
198202
You can’t perform that action at this time.
0 commit comments