Skip to content

Upgrade to Fabric8's 5.0 client and Quarkus 1.11.0.Final #288

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

Merged
merged 22 commits into from
Jan 18, 2021
Merged

Conversation

metacosm
Copy link
Collaborator

@metacosm metacosm commented Jan 7, 2021

Quarkus 1.11.0.Final is the first version to use Fabric8's client 5.0 so
we need to update both at the same time.

Overview of the changes:

  • Doneable classes have been removed along with all the involved complexity
  • Controller annotation has been simplified: the crdName field has been removed as that value is computed from the associated custom resource implementation
  • Custom Resource implementation classes need to be annotated with Group and Version annotations so that they can be identified properly. Optionally, they can also be annotated with Kind (if the name of the implementation class doesn't match the desired kind) and Plural if the plural version cannot be automatically computed (or the default computed version doesn't match your expectations).
  • The CustomResource class that needs to be extended is now parameterized with spec and status types so you can have an empty default implementation that does what you'd expect. If you don't need a status, using Void for the associated type should work.

@metacosm metacosm self-assigned this Jan 7, 2021
@metacosm metacosm marked this pull request as ready for review January 8, 2021 13:31
Copy link
Collaborator

@adam-sandor adam-sandor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to the CustomResource classes are really cool.

@goldmann
Copy link

This is pure awesomeness, it simplifies usage a lot! Both in SDK and in the code we need to write to use CustomResources. So big 👍

@@ -22,7 +22,7 @@

public static final int INITIAL_DELAY = 50;
public static final int PERIOD = 50;
public static final int TESTING_TIME_SLACK = 20;
public static final int TESTING_TIME_SLACK = 40;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look like it's working… 😞

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right... maybe this type of test just isn't a good idea. Probably the Github runner is just really slow. Let me take another look.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They also fail on my system, which, granted is not the fastest around… 😅

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll rewrite those tests so the timer is mocked, that's the only good solution.

@metacosm metacosm marked this pull request as draft January 12, 2021 21:20
@metacosm
Copy link
Collaborator Author

Reverting back to draft pending release of Quarkus 1.11.0.Final so that the upgrade will be made to that version before this PR is merged.

@metacosm metacosm changed the title feat: initial upgrade of client to 5.0.0 and quarkus to 1.11.0.CR1 Upgrade to Fabric8's 5.0 client and Quarkus 1.11.0.Final Jan 14, 2021
@metacosm metacosm marked this pull request as ready for review January 14, 2021 19:07
@metacosm
Copy link
Collaborator Author

Should we merge this, @adam-sandor @psycho-ir ?

@s-soroosh
Copy link
Contributor

Should we merge this, @adam-sandor @psycho-ir ?

Haven’t reviewed this PR yet. Will review it tomorrow

@s-soroosh
Copy link
Contributor

LGTM

@secondsun
Copy link
Contributor

I gave it a small smoke test (crud on my custom resource) and this PR seems to work.

@metacosm metacosm marked this pull request as draft January 15, 2021 09:14
@metacosm
Copy link
Collaborator Author

Found an issue thanks to @goldmann so reverting to draft untill I can solve it.

@goldmann
Copy link

I've tested latest changes with my not-so-trivial codebase and it works great!

@metacosm metacosm marked this pull request as ready for review January 15, 2021 11:47
A controller is not cluster-scoped, its associated custom resource type
is. As such, this functionality should (and is) controlled by the
custom resource type associated with the controller, not the controller
itself. If a custom resource implementation doesn't implement Namespaced
then it is cluster-scoped.
@adam-sandor
Copy link
Collaborator

LGTM

@adam-sandor adam-sandor merged commit 2385ed2 into master Jan 18, 2021
@metacosm metacosm deleted the client-v5 branch January 18, 2021 12:54
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.

5 participants