From f76b8d6fe2d5c0f1b142f04c9f251f3edd79b58d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Hern=C3=A1ndez?= <23639005+israel-hdez@users.noreply.github.com> Date: Mon, 10 Feb 2025 11:11:29 -0600 Subject: [PATCH 1/2] Revert "Better compatibility with in-place upgrades (#491)" This reverts commit 2a917eafe8ec716254423c9079f05aaa7f59ab0f. --- config/manager/manager.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 85d706242e8..c75dbddb54b 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -12,9 +12,6 @@ spec: matchLabels: control-plane: kserve-controller-manager controller-tools.k8s.io: "1.0" - strategy: - type: Recreate - rollingUpdate: nil template: metadata: labels: From 873ad0a843b5a4dac9424a8ce4fa315fd7f164df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Hern=C3=A1ndez?= <23639005+israel-hdez@users.noreply.github.com> Date: Mon, 10 Feb 2025 11:50:12 -0600 Subject: [PATCH 2/2] Use leader election for better compatibility with in-place upgrades MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous commit reverts 2a917e, which changed the configuration of the Deployment for the manager to use `Recreate` strategy. Such change was for better compatibility for in-place upgrades (see the commit message of the reverted one). Instead of changing the Deployment strategy, this commit is enabling leader election in the manager. The leader election also solves the issues mentioned in commit 2a917e. Also, not changing the Deployment strategy works better with odh-operator. Signed-off-by: Edgar Hernández <23639005+israel-hdez@users.noreply.github.com> --- config/default/manager_auth_proxy_patch.yaml | 1 - config/manager/manager.yaml | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index 4eae8f36b01..61f7af61aef 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -31,4 +31,3 @@ spec: - name: manager args: - "--metrics-addr=127.0.0.1:8080" - - "--leader-elect" diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index c75dbddb54b..de1d4a87c8c 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -27,6 +27,8 @@ spec: containers: - command: - /manager + args: + - "--leader-elect" image: ko://github.com/kserve/kserve/cmd/manager imagePullPolicy: Always name: manager