Skip to content

Commit

Permalink
Two replica failure support FTT=2 (pravega#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Ferapontov authored and Maxim Ferapontov committed Apr 15, 2022
1 parent 46bef88 commit 6fbd51b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/zk/generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,10 @@ func makeService(name string, ports []v1.ServicePort, clusterIP bool, external b
// MakePodDisruptionBudget returns a pdb for the zookeeper cluster
func MakePodDisruptionBudget(z *v1beta1.ZookeeperCluster) *policyv1beta1.PodDisruptionBudget {
pdbCount := intstr.FromInt(1)
// Support FTT=2 with 5 or more replicas
if z.Spec.Replicas >= 5 {
pdbCount = intstr.FromInt(2)
}
return &policyv1beta1.PodDisruptionBudget{
TypeMeta: metav1.TypeMeta{
Kind: "PodDisruptionBudget",
Expand Down

0 comments on commit 6fbd51b

Please sign in to comment.