File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ import (
39
39
_ "k8s.io/client-go/plugin/pkg/client/auth"
40
40
"k8s.io/klog/v2"
41
41
"k8s.io/klog/v2/textlogger"
42
+ "k8s.io/utils/ptr"
42
43
ctrl "sigs.k8s.io/controller-runtime"
43
44
crcache "sigs.k8s.io/controller-runtime/pkg/cache"
44
45
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -167,7 +168,13 @@ func main() {
167
168
HealthProbeBindAddress : probeAddr ,
168
169
LeaderElection : enableLeaderElection ,
169
170
LeaderElectionID : "9c4404e7.operatorframework.io" ,
170
- Cache : cacheOptions ,
171
+ // Recommended Leader Election values
172
+ // https://github.com/openshift/enhancements/blob/61581dcd985130357d6e4b0e72b87ee35394bf6e/CONVENTIONS.md#handling-kube-apiserver-disruption
173
+ LeaseDuration : ptr .To (137 * time .Second ),
174
+ RenewDeadline : ptr .To (107 * time .Second ),
175
+ RetryPeriod : ptr .To (26 * time .Second ),
176
+
177
+ Cache : cacheOptions ,
171
178
// LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily
172
179
// when the Manager ends. This requires the binary to immediately end when the
173
180
// Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
You can’t perform that action at this time.
0 commit comments