-
Notifications
You must be signed in to change notification settings - Fork 386
PodDisruptionBudget calculation is not working? #71
Comments
I had to manually delete the PDB and recreate it as you can't update a PDB. |
@Typositoire In this case, this is the expected behavior. It is recommended to run with 3-5 Consul servers, so this calculation gives the desired value of 0 allowed voluntary disruptions with 3 server replicas. As for the calculation itself, the behavior is a bit unintuitive since it's using integer division, which evaluations 3/2 as 1. We've accounted for this, though, so the calculation is correct. Hopefully that answers your question! |
The problem happens during rolling upgrades. Given 3 nodes with 1 consul-server each. I can never upgrade gracefully as this would go against the PDB (node drain). In a setup with KOPS this is what is happening and this is annoying. With 3 nodes you can survive a 1 node failure, I'm not sure why you force it to be 0. |
|
Thank you for the additional information! I'll do some more digging and see what we can do about this. |
@adilyse I've been chasing this issue up today as well, It appears that the sprig library doesn't currently support floats so what happens is the following 3/2 = 1 My current fix is as below, I can put together a pull request and update tests for you hopefully this evening. |
@adilyse Hopefully this solves this issue I implemented something different for the calculations and provided tests. Any problems let me know |
I have a 3 replicas setup and for some reason the PDB was set to 0.
ceil (sub (div (int .Values.server.replicas) 2) 1)
looks good to me but it's possible the calculation is off in GoTemplate ?The text was updated successfully, but these errors were encountered: