-
Notifications
You must be signed in to change notification settings - Fork 12
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
[CORE-119212] - Add/fix pdb for controllers #94
Conversation
} | ||
} | ||
|
||
func expectKafkaPDBZK(ctx context.Context, kafkaCluster *v1beta1.KafkaCluster) { |
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.
Separate test for ZK and KRaft
}).WithTimeout(1000).Should(MatchError(fmt.Sprintf("poddisruptionbudgets.policy \"%s-controller-pdb\" not found", kafkaCluster.Name))) | ||
} | ||
|
||
func expectKafkaPDBKraft(ctx context.Context, kafkaCluster *v1beta1.KafkaCluster) { |
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.
Separate test for ZK and KRaft
minAvailable) | ||
} | ||
|
||
func (r *Reconciler) podDisruptionBudgetControllers(log logr.Logger) (runtime.Object, error) { |
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.
Do we need to add some functional tests for the new functions?
}, | ||
}, | ||
}, nil | ||
} | ||
|
||
func (r *Reconciler) getControllerCount() (int, error) { |
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.
See above note
|
||
// Calculate minAvailable as max between brokerCount - 1 (so we only allow 1 controller to be disrupted) | ||
// and 1 (case when there is only 1 controller) | ||
func (r *Reconciler) computeControllerMinAvailable() (intstr.IntOrString, error) { |
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.
See above note about functional tests
Description
Please provide a meaningful description of what this change will do, or is for. Bonus points for including links to
related issues, other PRs, or technical references.
Note that by not including a description, you are asking reviewers to do extra work to understand the context of this
change, which may lead to your PR taking much longer to review, or result in it not being reviewed at all.
Type of Change
Checklist