Skip to content

Commit

Permalink
Use leader election for better compatibility with in-place upgrades (#…
Browse files Browse the repository at this point in the history
…492)

* Revert "Better compatibility with in-place upgrades (#491)"

This reverts commit 2a917ea.

* Use leader election for better compatibility with in-place upgrades

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 <[email protected]>

---------

Signed-off-by: Edgar Hernández <[email protected]>
  • Loading branch information
israel-hdez authored Feb 11, 2025
1 parent 2a917ea commit 5bfa8ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ spec:
- name: manager
args:
- "--metrics-addr=127.0.0.1:8080"
- "--leader-elect"
5 changes: 2 additions & 3 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -30,6 +27,8 @@ spec:
containers:
- command:
- /manager
args:
- "--leader-elect"
image: ko://github.com/kserve/kserve/cmd/manager
imagePullPolicy: Always
name: manager
Expand Down

0 comments on commit 5bfa8ea

Please sign in to comment.