Changing Discovery & PeeringCandidate CRDs behaviour #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello everyone.
The aim of this PR is to solve two open issues: #32 and #34.
Shortly, the behavior of some CRDs and controllers was not the one we expected.
More specifically, the Discovery controller was selecting a
PeeringCandidate
to "reserve" without giving the user the possibility of manually selecting aPeeringCandidate
among the ones available for aReservation
.Additionally, the Discovery controller only returned a single
PeeringCandidate
but we believe a list of possiblePeeringCandidate
is more appropriate.Moreover, I found out many redundant relationships among the different objects involved:
Solver
CR had a reference to aPeeringCandidate
CR in itsstatus
and aPeeringCandidate
CR had a reference to aSolver
CR (through aSolverID
) in its ownspec
PeeringCandidate
CR had a boolean flag reserved in its own spec and a Reservation object had a reference to aPeeringCandidate
(through aPeeringCandidateID
) in its ownspec
This PR should also cleans up the above circular dependencies.
You can find more info on the commit message body, but please ask me any question you might have.
Waiting for your feedback.
Thanks.
Francesco