-
Notifications
You must be signed in to change notification settings - Fork 48
[slice] Update AdmissionCheck depending on success/failure. #521
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
cf51f5f
to
6f0c2c6
Compare
6f0c2c6
to
de11b5e
Compare
if len(relevantChecks) == 0 { | ||
return nil, nil | ||
} |
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.
Should there be exactly one? If yes, should we assert that that is the case?
If we have >1 slice for the workload, will we just use 1 AC?
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.
Yeah, you right. Than I think we should merge #520 first.
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.
As we discussed, we don’t need to have multiple admission checks.
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.
Should we throw an error if there is more than 1, since this should never occur?
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.
Not sure, to be honest. Maybe we should create a webhook to validate whether an AdmissionCheck already exists. What do you think?
f1777b1
to
80c5088
Compare
@gabesaba I've addressed all comments. Could you please take a look? |
currentCondition := ptr.Deref(apimeta.FindStatusCondition(ac.Status.Conditions, kueue.AdmissionCheckActive), metav1.Condition{}) | ||
newCondition := metav1.Condition{ | ||
Type: kueue.AdmissionCheckActive, | ||
Status: metav1.ConditionTrue, |
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 there a mechanism (in Kueue?) which eventually transitions this to false if this controller fails?
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.
As I see in the provisioning request controller, we set it to False only when there is a validation error in the admission check config (see here). We are not using the admission check config, so we don’t need it. Therefore, I think we should just set it to true.
if len(relevantChecks) == 0 { | ||
return nil, nil | ||
} |
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.
Should we throw an error if there is more than 1, since this should never occur?
80c5088
to
3caa690
Compare
6b0683b
to
07a7b68
Compare
Handle other Slice statuses.
…n with TopologyAssignment.
07a7b68
to
abf65b0
Compare
return ctrl.Result{}, err | ||
} | ||
if err != nil { | ||
return ctrl.Result{}, r.createSlice(ctx, wl, ac) |
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.
why do we create slice in this branch?
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.
or, why do we return?
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 don’t have statuses on the Slice yet, so we need to stop reconciliation for now. Once we receive the status, we can restart reconciliation and handle it then.
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 think a package like this is a good idea. Nice :)
lgtm, thanks! |
Fixes / Features