Skip to content
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

feat: add PodDisruptionBudget trackability #999

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

britaniar
Copy link
Contributor

Description of your changes

Fixes #

I have: added PDB trackability and unit test

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

Special notes for your reviewer

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • go.mod: Language not supported
// Check if conditions are up-to-date
if poddisruptionbudget.ConditionsAreUpToDate(&pdb) {
if cond := meta.FindStatusCondition(pdb.Status.Conditions, policyv1.DisruptionAllowedCondition); cond != nil {
if cond.Status == metav1.ConditionTrue && cond.Reason == policyv1.SufficientPodsReason {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/kubernetes/kubernetes/blob/35f584187a6d1250191aa24b0dcf735350f57508/staging/src/k8s.io/api/policy/v1/types.go#L140 I think InsufficientPods reason should also be accounted for, since a PDB can block an eviction and in this case it's still available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants