-
Notifications
You must be signed in to change notification settings - Fork 980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't create an impossible disruption budget for smaller clusters #384
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1052,6 +1052,11 @@ func (c *Cluster) generateCloneEnvironment(description *acidv1.CloneDescription) | |
func (c *Cluster) generatePodDisruptionBudget() *policybeta1.PodDisruptionBudget { | ||
minAvailable := intstr.FromInt(1) | ||
|
||
// Is master disruption is enabled or if there is no master, set the budget to 0. | ||
if c.Spec.AllowMasterDisruption || c.Spec.NumberOfInstances <= 0 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we create the pod disruption budget when we scale up? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll test with kind So, simply scaling to 0 and then back to 1 does't work out of the box. Syncing gets interrupted while syncing roles:
Deleting the operator pod helps to sync roles so that pdb is synced, too (and set to minAvailable: 1).
|
||
minAvailable = intstr.FromInt(0) | ||
} | ||
|
||
return &policybeta1.PodDisruptionBudget{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: c.podDisruptionBudgetName(), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is "allow" a good word? should we not just stick with "enable"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And then it should also default to "enabled=True"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. And should be introduced to all the different config targets?