Commit f73945e
fix: enable LeaderElectionReleaseOnCancel for smooth RollingUpdates
Enable the LeaderElectionReleaseOnCancel option in the controller manager
to fix a deadlock issue during RollingUpdate deployments with leader
election enabled.
Without this setting, the old pod holds the leader lease during shutdown,
preventing the new pod from becoming ready. This creates a deadlock where
Kubernetes won't terminate the old pod because the new pod isn't ready,
and the new pod can't become ready because it can't acquire the lease.
With LeaderElectionReleaseOnCancel enabled, the old pod voluntarily
releases the lease when it receives a shutdown signal, allowing the new
pod to acquire leadership immediately and become ready, enabling smooth
rolling updates.
Signed-off-by: Armando Ruocco <[email protected]>1 parent 782fe77 commit f73945e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
0 commit comments