diff --git a/bare-metal-fulfillment-operator/cmd/main.go b/bare-metal-fulfillment-operator/cmd/main.go index e2e31b039e..4ac313ae45 100644 --- a/bare-metal-fulfillment-operator/cmd/main.go +++ b/bare-metal-fulfillment-operator/cmd/main.go @@ -23,6 +23,7 @@ import ( "fmt" "os" "path/filepath" + "time" // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) // to ensure that exec-entrypoint and run can make use of them. @@ -31,6 +32,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" + "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/certwatcher" @@ -236,6 +238,9 @@ func main() { HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, LeaderElectionID: "89c2406a.openshift.io", + LeaseDuration: ptr.To(35 * time.Second), + RenewDeadline: ptr.To(25 * time.Second), + RetryPeriod: ptr.To(5 * time.Second), Cache: cache.Options{ ByObject: map[client.Object]cache.ByObject{ &osacv1alpha1.BareMetalPool{}: { diff --git a/osac-operator/cmd/main.go b/osac-operator/cmd/main.go index 726e85d0f1..340b49492f 100644 --- a/osac-operator/cmd/main.go +++ b/osac-operator/cmd/main.go @@ -48,6 +48,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/tools/clientcmd" + "k8s.io/utils/ptr" kubevirtv1 "kubevirt.io/api/core/v1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -1344,6 +1345,9 @@ func main() { HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, LeaderElectionID: "95f7e044.openshift.io", + LeaseDuration: ptr.To(35 * time.Second), + RenewDeadline: ptr.To(25 * time.Second), + RetryPeriod: ptr.To(5 * time.Second), // LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily // when the Manager ends. This requires the binary to immediately end when the // Manager is stopped, otherwise, this setting is unsafe. Setting this significantly diff --git a/tests/e2e/core/helpers.py b/tests/e2e/core/helpers.py index a1f3d411ce..cb0a369730 100644 --- a/tests/e2e/core/helpers.py +++ b/tests/e2e/core/helpers.py @@ -443,7 +443,7 @@ def wait_for_cluster_progressing(*, k8s: K8sClient, name: str) -> None: poll_until( fn=lambda: k8s.get_cluster_order_phase(name=name, checked=False), until=lambda v: v == "Progressing", - retries=30, + retries=60, delay=2, description=f"{name} ClusterOrder Progressing phase", )