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

Changing Discovery & PeeringCandidate CRDs behaviour #41

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Changing Discovery & PeeringCandidate CRDs behaviour #41

merged 1 commit into from
Apr 22, 2024

Conversation

fracappa
Copy link
Contributor

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 a PeeringCandidate among the ones available for a Reservation.

Additionally, the Discovery controller only returned a single PeeringCandidate but we believe a list of possible PeeringCandidate is more appropriate.

Moreover, I found out many redundant relationships among the different objects involved:

  • A Solver CR had a reference to a PeeringCandidate CR in its status and a PeeringCandidate CR had a reference to a Solver CR (through a SolverID) in its own spec
  • A PeeringCandidate CR had a boolean flag reserved in its own spec and a Reservation object had a reference to a PeeringCandidate (through a PeeringCandidateID) in its own spec

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

1.PeeringCandidate CR has no longer Reserved flag
2.Discovery CRD keeps a matching PC list in its status rather than a single PC.
3. Removing PeeringCandidate info from Solver status.
4. The Discovery controller only creates PC for found flavors. It no longers auto-select a PC for reservation.
5. The Discovery controller returns a list of PC in its status, no longer a single (reserved) PC.
5. The Reservation controller first checks if its associated peeringCandidate it is available. If so, it makes it anavailable and goes ahead; otherwise it fails.
6. The association between a Solver and a PC is now available only at the PC CR through spec.solverID; we no longer have any info of the PC inside the Solver CR. Because of this, we no longer have logic handling PC inside the Solver controller.

* adjusting CRD creation functions and PC list creation in Discovery controller

* bug fix

* deleting useless config files

* fixing discovery controller misbehaviour

* bug fix: adding PC Spec update into reservtion controller

* adding creation time info into PC status at creation time

* restore default solver sample

* bug fix: parse flavour & forgePeeringCandidate

cleaning up code

second clean up

third clean up for merge

cleaning up the code

removing useless file

fix artifacts generation

fix comment for linting

second fix comment for linting

code clean up
@frisso frisso merged commit f0734c6 into fluidos-project:main Apr 22, 2024
6 checks passed
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.

3 participants