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

Create Kubernetes extension #1300

Merged
merged 4 commits into from
Mar 27, 2019
Merged

Create Kubernetes extension #1300

merged 4 commits into from
Mar 27, 2019

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Mar 7, 2019

Fixes: #565

This supersedes #1031

@geoand geoand mentioned this pull request Mar 7, 2019
@emmanuelbernard
Copy link
Member

We should all read the guide doc and then have a conversation on how we want to best surface the Kubernetes concept in Quarkus apps to exploits what ap4k generates.

@geoand
Copy link
Contributor Author

geoand commented Mar 7, 2019

@emmanuelbernard 👍

@geoand
Copy link
Contributor Author

geoand commented Mar 7, 2019

cc @iocanel

@geoand
Copy link
Contributor Author

geoand commented Mar 11, 2019

This would also fix #1382

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

@geoand I added some comments for the guide.

docs/src/main/asciidoc/ap4k.adoc Show resolved Hide resolved
docs/src/main/asciidoc/ap4k.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/ap4k.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/ap4k.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/ap4k.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/ap4k.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/ap4k.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/ap4k.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/ap4k.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/ap4k.adoc Outdated Show resolved Hide resolved
@geoand
Copy link
Contributor Author

geoand commented Mar 11, 2019

@gsmet Thanks for the thorough review! I will address the concerns later on tonight.

@geoand
Copy link
Contributor Author

geoand commented Mar 11, 2019

@gsmet I addresses the comments from your review

@gsmet
Copy link
Member

gsmet commented Mar 13, 2019

@geoand I added one more comment and there's a conflict, could you rebase?

@stuartwdouglas @emmanuelbernard I'm tempted to merge this one once @geoand has fixed the last minor issues and iterate from here. Do you have any reservations about it?

@geoand
Copy link
Contributor Author

geoand commented Mar 13, 2019

@gsmet PR rebased

@geoand geoand requested a review from gsmet March 13, 2019 08:12
@gsmet
Copy link
Member

gsmet commented Mar 13, 2019

@geoand sorry I spotted one last typo. Could you fix it and squash everything? Let's avoid commits like "Fix broken rebase" in the history.

I will start a thread on the list to discuss this subject as I'm not totally sure what Emmanuel wanted to say in its message (that's the reason I haven't merged it yet).

@geoand
Copy link
Contributor Author

geoand commented Mar 13, 2019

@geoand sorry I spotted one last typo. Could you fix it and squash everything? Let's avoid commits like "Fix broken rebase" in the history.

I will start a thread on the list to discuss this subject as I'm not totally sure what Emmanuel wanted to say in its message (that's the reason I haven't merged it yet).

@gsmet I am generally in favor of each PR being a single commit :)

@geoand
Copy link
Contributor Author

geoand commented Mar 13, 2019

@gsmet comment addressed and commits squashed

@geoand geoand requested a review from gsmet March 13, 2019 11:51
gsmet
gsmet previously approved these changes Mar 13, 2019
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

I will start a discussion on the ML to address Emmanuel's comment. Other than that, it looks like a nice addition and something people want.

@geoand
Copy link
Contributor Author

geoand commented Mar 13, 2019

@gsmet Sounds good :)

@geoand
Copy link
Contributor Author

geoand commented Mar 14, 2019

@gsmet was there any verdict in this perhaps?

Thanks

@gsmet
Copy link
Member

gsmet commented Mar 14, 2019

@geoand well, not really, see Emmanuel's post on the quarkus-dev list.

@gsmet gsmet added the triage/on-ice Frozen until external concerns are resolved label Mar 14, 2019
@gsmet
Copy link
Member

gsmet commented Mar 14, 2019

Quoting @emmanuelbernard:

We wanted to discuss the use of annotations vs properties in the context of Quarkus for the integration with Kubernetes. To find whatever felt more natural. I can't drive that conversation right now but David had some possible opinions.

@geoand
Copy link
Contributor Author

geoand commented Mar 15, 2019

Thanks, I must have missed the discussion

@geoand
Copy link
Contributor Author

geoand commented Mar 27, 2019

@dmlloyd @iocanel would you prefer that I remove the docker build and resource application capabilities (thus removing the extra properties from ApplicationInfoBuildItem) thus keeping things cleaner and focus only on resource generation?

@dmlloyd
Copy link
Member

dmlloyd commented Mar 27, 2019

Sure, that sounds like a reasonable first step. Introducing things incrementally is definitely easier when it can be done.

@iocanel
Copy link
Contributor

iocanel commented Mar 27, 2019

@geoand: Generally speaking, I prefer the approach of adding staff gradually, as it makes the review process so much easier.

Now, in the particular case (where they have been added already), it's up to you and @dmlloyd to figure how to proceed.

@geoand
Copy link
Contributor Author

geoand commented Mar 27, 2019

I just pushed a commit that leaves only the basic resource generation functionality in. Please take a look

dmlloyd
dmlloyd previously approved these changes Mar 27, 2019
@dmlloyd
Copy link
Member

dmlloyd commented Mar 27, 2019

Pending CI

@geoand
Copy link
Contributor Author

geoand commented Mar 27, 2019

This is currently still work in progress because I see that bringing in the extension results in all of it's dependencies being added to the generated lib directory (that didn't use to be the case) but I guess the bootstrapping work has changed things

Copy link
Member

@dmlloyd dmlloyd left a comment

Choose a reason for hiding this comment

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

OK I'll hold off on approval then until you're ready.

@dmlloyd dmlloyd dismissed their stale review March 27, 2019 14:19

Change is not ready yet after all.

@geoand
Copy link
Contributor Author

geoand commented Mar 27, 2019

Thanks. I think I will need to add a runtime artifact that doesn't do have any actual code, but will help the boostraping mechanism correctly figure out the dependencies

@geoand
Copy link
Contributor Author

geoand commented Mar 27, 2019

I added another commit that fixes the dependencies issue, so this is now good to go

@geoand
Copy link
Contributor Author

geoand commented Mar 27, 2019

@iocanel mind taking one last look as well?

private Map<String, Integer> verifyPorts(List<KubernetesPortBuildItem> kubernetesPortBuildItems) {
final Map<String, Integer> result = new HashMap<>();
final Set<Integer> usedPorts = new HashSet<>();
for (KubernetesPortBuildItem entry : kubernetesPortBuildItems) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Really like the fact that we perform this verification!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The more build time errors the better :)

Copy link
Contributor

@iocanel iocanel left a comment

Choose a reason for hiding this comment

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

LGTM

@geoand geoand merged commit f519389 into quarkusio:master Mar 27, 2019
@geoand geoand deleted the ap4k branch March 27, 2019 16:54
@gsmet gsmet added this to the 0.13.0 milestone Apr 2, 2019
@gsmet gsmet changed the title Create ap4k extension Create Kubernetes extension Apr 2, 2019
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this pull request Sep 4, 2022
    This allows users to set a desired name for the applications
    (using quarkus.application.name) or version.
    The idea came from:

    quarkusio/quarkus#1300 (comment)

    and this configuration is meant to be used by extensions that for some
    reason need this information (like the planned kubernetes extension)
maxandersen pushed a commit to maxandersen/quarkus that referenced this pull request Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants