-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add Dekorate support #446
Add Dekorate support #446
Conversation
starter-core/src/main/java/io/micronaut/starter/feature/dekorate/DekorateFeature.java
Outdated
Show resolved
Hide resolved
@Nullable | ||
@Override | ||
public String getMicronautDocumentation() { | ||
return "https://micronaut-projects.github.io/micronaut-kubernetes/latest/guide/index.html"; |
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.
Not sure whether to link to kubernetes micronaut documentation. Strictly speaking, to generate k8s manifests, that module is not needed.
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.
- this module is not now required, so either I'll add dependency on micronaut-kubernetes, or will remove this method. WDYT?
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.
Some minor changes and a question. Overall looks good!
...ore/src/main/java/io/micronaut/starter/feature/build/gradle/templates/buildGradle.rocker.raw
Outdated
Show resolved
Hide resolved
starter-core/src/main/java/io/micronaut/starter/feature/dekorate/DekorateFeature.java
Outdated
Show resolved
Hide resolved
starter-core/src/main/java/io/micronaut/starter/feature/dekorate/DekorateFeature.java
Outdated
Show resolved
Hide resolved
starter-core/src/main/java/io/micronaut/starter/feature/dekorate/DekorateHalkyon.java
Outdated
Show resolved
Hide resolved
starter-core/src/main/java/io/micronaut/starter/feature/dekorate/DekorateJaeger.java
Outdated
Show resolved
Hide resolved
starter-core/src/main/java/io/micronaut/starter/feature/dekorate/DekorateTekton.java
Outdated
Show resolved
Hide resolved
starter-core/src/main/java/io/micronaut/starter/feature/dekorate/DekorateTekton.java
Outdated
Show resolved
Hide resolved
starter-core/src/main/java/io/micronaut/starter/feature/dekorate/DekorateFeature.java
Outdated
Show resolved
Hide resolved
starter-core/src/test/groovy/io/micronaut/starter/feature/FeatureSpec.groovy
Outdated
Show resolved
Hide resolved
...ter-core/src/test/groovy/io/micronaut/starter/feature/dekorate/DekorateKubernetesSpec.groovy
Outdated
Show resolved
Hide resolved
c3de202
to
ddd5a77
Compare
@graemerocher @ilopmar what's left to discuss:
|
starter-core/src/main/java/io/micronaut/starter/feature/build/maven/templates/pom.rocker.raw
Outdated
Show resolved
Hide resolved
@pgressa nice! I see they removed their support for Micronaut in dekorateio/dekorate@466e892#diff-4f6f5cc3fccf73f75ae9ccf4ad2f4d1e I think we should have a better integration so that stuff like hardcoding the port in |
@alvarosanchez from that commit it seems they never supported it at all, as the classes are basically empty. What you mean better support integration? Do you mean to implement framework support to dekorate? This PR basically introduces and configures the dekorate annotations that should produce manifest with similarconfiguration to the one that the Kubernetes feature produces. Once micronaut-projects/micronaut-core#4012 will be merged the readiness/liveness probes should be used here as well. |
Yes, implement framework support for Dekorate. Not in starter, but as part of micronaut-projects/micronaut-kubernetes#46 (which is what I originally intended when I created the issue). Regarding the commit, the classes weren't empty. You need to click "Load diff" to see them. However, they didn't do a great job at detecting the port: dekorateio/dekorate@466e892#diff-e5672fa55806c7dfd54773de95f3fedbL40 If you look at the Spring Boot support, they actually read the configuration files to detect the port, among many other things. |
:D well I'm aware of the "Load diff" button.. but exactly because they won't read configuration I would say the integration was more a generated project, otherwise they wouldn't remove it. But that's not important at this moment. What is important like how to proceed with this PR. Could you elaborate more on the integration from micronaut-kubernetes and how it would be supporter from starter project. Because from my poor understanding of how are things working:
But how would that module work? Like we would have our annotation processor that feeds the values directly into dekorate generator? |
Sorry, I didn't understand you correctly in the first place.
Exactly that, the same as the Spring Boot integration does. I'm ok with moving this PR forward if then we work on such integration. |
What @alvarosanchez says makes sense, you want to be able to set the correct port automatically I guess. |
@graemerocher @alvarosanchez guys, I can go for it if you think current version is not usable for users. I would personally prefer to merge this one, then introduce the module that will feed the values from within the app context, and after that I would adjust the starter project and remove hard-coded values and leave just the annotation. WDYT? |
I already said I'm ok with doing that. |
@alvarosanchez OK, I'm just not sure whether @graemerocher requires those changes or not :) |
Ok so seems like 1.0.2 works with gradle and java. Unfortunately Kotlin is not working with our setup, so I have created new issue there dekorateio/dekorate#632 and will disallow combination of Kotlin + Gradle in DekorateValidator so we can move forward. So here's the bump to 1.0.2 micronaut-projects/micronaut-core#4131 |
d18f2a4
to
614b450
Compare
56d3ac2
to
4d870c3
Compare
@graemerocher pls review |
@pgressa The dekorate kotlin + gradle is supposedly fixed. dekorateio/dekorate#632. Can you test/review and update this PR? |
@jameskleeh oh I didn't notice they fixed... going for it |
@jameskleeh works.. will force push fix |
Dekorate in latests stable version 1.0.1 covers in this MR:
Left to do: