From 875978d025dcc78a7e86719953efb07c5cd95469 Mon Sep 17 00:00:00 2001 From: Ivan Milchev Date: Wed, 20 Nov 2024 14:43:02 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20increase=20leader=20elect=20time?= =?UTF-8?q?outs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ivan Milchev --- cmd/mondoo-operator/operator/cmd.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/mondoo-operator/operator/cmd.go b/cmd/mondoo-operator/operator/cmd.go index ce2758cb..31ba5a25 100644 --- a/cmd/mondoo-operator/operator/cmd.go +++ b/cmd/mondoo-operator/operator/cmd.go @@ -6,6 +6,7 @@ package operator import ( "errors" "fmt" + "time" "github.com/go-logr/logr" "github.com/spf13/cobra" @@ -15,6 +16,7 @@ import ( // to ensure that exec-entrypoint and run can make use of them. _ "k8s.io/client-go/plugin/pkg/client/auth" + "k8s.io/utils/ptr" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" @@ -75,6 +77,8 @@ func init() { HealthProbeBindAddress: *probeAddr, LeaderElection: *enableLeaderElection, LeaderElectionID: "60679458.mondoo.com", + LeaseDuration: ptr.To(30 * time.Second), + RenewDeadline: ptr.To(20 * time.Second), Client: client.Options{ Cache: &client.CacheOptions{ DisableFor: []client.Object{