-
Notifications
You must be signed in to change notification settings - Fork 38
fix: handle PickFixed CRP in eviction controller #998
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
Conversation
| // we don't know the desired bindings for PickAll. | ||
| } | ||
|
|
||
| var disruptionsAllowed int |
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.
I can't seem to find where "For PickAll CRPs, MaxUnavailable won't be specified in DB" is enforced?
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.
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.
so we mark any eviction associated with the bad PDB as not executed instead of rejecting the PBD itself
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.
We use PDB as an information source as of now, even if the CRP targeted by PDB is missing we allow the PDB to exist. So in the case of,
- PickAll CRP where the PDB specifies MaxUnavailable or MinAvailable as percentage we say the eviction cannot be executed due to a misconfigured PDB
- In the case for PickFixed CRP, the eviction fails on validation, and we mark eviction as invalid
81821b1 to
c706b93
Compare
| // * if the linked Placement object is of the PickFixed placement type, | ||
| // the percentage is against the number of clusters specified in the placement (i.e., the | ||
| // length of ClusterNames field in the placement policy); | ||
| // we don't perform any calculation because eviction is not allowed for PickFixed CRP. |
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.
what about pickAll?
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.
PickAll API comments
For MaxUnavailable: https://github.com/Azure/fleet/blob/main/apis/placement/v1alpha1/disruptionbudget_types.go#L49-L50
For MinAvailable:
https://github.com/Azure/fleet/blob/main/apis/placement/v1alpha1/disruptionbudget_types.go#L79-L80
Description of your changes
Fixes #
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer