-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change PDBs to maxUnavailable: 1 (#731)
* bump: operator-rs 0.52.0 * changelog * Change PDBs to maxUnavailable: 1 * bump: operator-rs 0.52.1 * wording
- Loading branch information
Showing
8 changed files
with
20 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 3 additions & 81 deletions
84
docs/modules/zookeeper/pages/usage_guide/operations/pod-disruptions.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,8 @@ | ||
= Allowed Pod disruptions | ||
|
||
You can configure the allowed Pod disruptions for Zookeeper nodes as described in xref:concepts:operations/pod_disruptions.adoc[]. | ||
You can configure the permitted Pod disruptions for Zookeeper nodes as described in xref:concepts:operations/pod_disruptions.adoc[]. | ||
|
||
Unless you configure something else or disable our PodDisruptionBudgets (PDBs), we write the following PDBs: | ||
Unless you configure something else or disable the provided PodDisruptionBudgets (PDBs), the following PDBs are written: | ||
|
||
== Servers | ||
|
||
Zookeeper servers need a certain number of nodes to be available to form a quorum to serve client requests. | ||
|
||
Taking this into consideration, our operator uses the following algorithm to determine the maximum number of servers allowed to be unavailable at the same time: | ||
|
||
`num_servers` is the number of server in the Zookeeper cluster, summed over all `roleGroups`. | ||
|
||
[source,rust] | ||
---- | ||
fn quorum_size(num_servers: u16) -> u16 { | ||
// Same as max((num_servers / 2) + 1, 1), but without the need for floating point arithmetics, | ||
// which are subject to rounding errors. | ||
max((num_servers + 2) / 2, 1) | ||
} | ||
// Minimum required amount of servers to form quorum. | ||
let quorum_size = quorum_size(num_servers); | ||
// Subtract one to not cause a single point of failure | ||
let max_unavailable = num_servers.saturating_sub(quorum_size).saturating_sub(1); | ||
// Clamp to at least a single node allowed to be offline, so we don't block Kubernetes nodes from draining. | ||
let max_unavailable = max(max_unavailable, 1) | ||
---- | ||
|
||
This results e.g. in the following numbers: | ||
|
||
TIP: It is strongly recommended to use an odd number of servers (e.g. 3, 5 or 7). | ||
|
||
[cols="1,1,1"] | ||
|=== | ||
|Number of servers | ||
|Quorum size | ||
|Maximum unavailable servers | ||
|
||
|1 | ||
|1 | ||
|1 | ||
|
||
|2 | ||
|2 | ||
|1 | ||
|
||
|3 | ||
|2 | ||
|1 | ||
|
||
|4 | ||
|3 | ||
|1 | ||
|
||
|5 | ||
|3 | ||
|1 | ||
|
||
|6 | ||
|4 | ||
|1 | ||
|
||
|7 | ||
|4 | ||
|2 | ||
|
||
|8 | ||
|5 | ||
|2 | ||
|
||
|9 | ||
|5 | ||
|3 | ||
|
||
|10 | ||
|6 | ||
|3 | ||
|
||
|20 | ||
|11 | ||
|8 | ||
|=== | ||
The provided PDBs only allow a single server to be offline at any given time, regardless of the number of replicas or `roleGroups`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters