mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Fix maxUnavailable of StatefulSet should not less than 1
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
This commit is contained in:
parent
9d85e18ec0
commit
85e3194cf6
@ -618,7 +618,11 @@ func updateStatefulSetAfterInvariantEstablished(
|
||||
if err != nil {
|
||||
return &status, err
|
||||
}
|
||||
|
||||
// maxUnavailable might be zero for small percentage without round up.
|
||||
// So we have to enforce it not to be less than 1.
|
||||
if maxUnavailable < 1 {
|
||||
maxUnavailable = 1
|
||||
}
|
||||
}
|
||||
|
||||
// Collect all targets in the range between the 0 and Spec.Replicas. Count any targets in that range
|
||||
|
Loading…
Reference in New Issue
Block a user