Skip to content

Commit be6d552

Browse files
authored
🧹 increase leader elect timeouts (#1204)
Signed-off-by: Ivan Milchev <ivan@mondoo.com>
1 parent d7876c4 commit be6d552

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • cmd/mondoo-operator/operator

cmd/mondoo-operator/operator/cmd.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package operator
66
import (
77
"errors"
88
"fmt"
9+
"time"
910

1011
"github.com/go-logr/logr"
1112
"github.com/spf13/cobra"
@@ -15,6 +16,7 @@ import (
1516
// to ensure that exec-entrypoint and run can make use of them.
1617

1718
_ "k8s.io/client-go/plugin/pkg/client/auth"
19+
"k8s.io/utils/ptr"
1820

1921
batchv1 "k8s.io/api/batch/v1"
2022
corev1 "k8s.io/api/core/v1"
@@ -75,6 +77,8 @@ func init() {
7577
HealthProbeBindAddress: *probeAddr,
7678
LeaderElection: *enableLeaderElection,
7779
LeaderElectionID: "60679458.mondoo.com",
80+
LeaseDuration: ptr.To(30 * time.Second),
81+
RenewDeadline: ptr.To(20 * time.Second),
7882
Client: client.Options{
7983
Cache: &client.CacheOptions{
8084
DisableFor: []client.Object{

0 commit comments

Comments
 (0)