-
Notifications
You must be signed in to change notification settings - Fork 6
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
Implement ServerSelector
in ServerClaimReconciler
#86
Conversation
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.
Thanks for the PR @aobort! Please find my comments below.
The core question I have here:
When I claim a Server
via a Ref do I want to also allow a Selector
or do we ignore it? My understanding of a Ref is: if the Server
is Available
- claim it! No matter what it's labels are. On the other side the ServerSelector
allows you to select the next best Server
which has the correct set of labels. So the Ref should have precedence over the selector. On the other side if there is no Ref, try to use the selector.
ServerSelector
in ServerClaimReconciler
I'd prefer not to make it overcomplicated and stick to two options:
without implementing complex decision making like "if server by reference is not claimable, then let's try to find another one by selector". In other words, if one put explicit reference to server, then operator should claim it or stop the process. |
You are right: we should stick to the following semantic:
|
Can you also run |
@afritzler Test (not included into PR) for the case when neither it is impossible to define which server will be claimed in case ref and selector are empty. Thus I've made a try to just get server from the claim after In total: some test case might fail occasionally. The solution which works is to:
|
To test the case, that In general each suite test ( |
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.
The PR looks good to me now. Just one minor naming issue I have.
Signed-off-by: Artem Bortnikov <[email protected]>
Signed-off-by: Artem Bortnikov <[email protected]>
Signed-off-by: Artem Bortnikov <[email protected]>
Signed-off-by: Artem Bortnikov <[email protected]>
Signed-off-by: Artem Bortnikov <[email protected]>
93bd661
to
0b62b18
Compare
@afritzler fixed. Pls, review |
Proposed Changes
ClaimedServerRef
to.status
. Since.spec.serverRef
is an optional field it's reasonable to store reference to claimed server in the claim's status.spec.serverSelector
fieldFixes #68