From db13c96199f4b75c2d94b0d092af72f78a1b29dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20M=C3=B6ller?= Date: Wed, 24 Jan 2024 12:55:36 +0100 Subject: [PATCH] chore: disable leader election for single replica deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakob Möller --- bundle/manifests/lvms-operator.clusterserviceversion.yaml | 5 +++-- config/default/manager_metrics_patch.yaml | 2 +- config/manager/manager.yaml | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bundle/manifests/lvms-operator.clusterserviceversion.yaml b/bundle/manifests/lvms-operator.clusterserviceversion.yaml index abed61346..b21fac60d 100644 --- a/bundle/manifests/lvms-operator.clusterserviceversion.yaml +++ b/bundle/manifests/lvms-operator.clusterserviceversion.yaml @@ -502,7 +502,8 @@ spec: selector: matchLabels: app.kubernetes.io/name: lvms-operator - strategy: {} + strategy: + type: Recreate template: metadata: annotations: @@ -515,7 +516,7 @@ spec: containers: - args: - --health-probe-bind-address=:8081 - - --leader-elect + - --leader-elect=false command: - /lvms - operator diff --git a/config/default/manager_metrics_patch.yaml b/config/default/manager_metrics_patch.yaml index deb4fdfff..e24aa4780 100644 --- a/config/default/manager_metrics_patch.yaml +++ b/config/default/manager_metrics_patch.yaml @@ -10,7 +10,7 @@ spec: - name: manager args: - "--health-probe-bind-address=:8081" - - "--leader-elect" + - "--leader-elect=false" volumeMounts: - mountPath: /tmp/k8s-metrics-server/serving-certs name: metrics-cert diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 514087d36..fc79db877 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -24,6 +24,8 @@ spec: matchLabels: app.kubernetes.io/name: lvms-operator replicas: 1 + strategy: + type: Recreate template: metadata: annotations: @@ -41,7 +43,7 @@ spec: - /lvms - operator args: - - --leader-elect + - --leader-elect=false image: controller:latest # if name is changed here, same should be reflected in 'controller/defaults.go' # search for 'ContainerName'