-
Notifications
You must be signed in to change notification settings - Fork 72
kubernetes-kotlin template #323
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
base: master
Are you sure you want to change the base?
Conversation
|
PR is now waiting for a maintainer to run the template acceptance tests. Note for the maintainer: To run the acceptance tests, please comment /run-templates on the PR |
|
|
||
| import com.pulumi.kubernetes.apps_v1.Deployment | ||
| import com.pulumi.kubernetes.apps_v1.DeploymentArgs | ||
| import com.pulumi.kubernetes.apps_v1.inputs.DeploymentSpecArgs |
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.
I believe more recent versions of com.pulumi:kubernetes upgraded to the following style of imports:
import com.pulumi.kubernetes.apps.v1.Deployment
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.
What version of the com.pulumi:kubernetes artifact is the new package available on ?
I don't see it in com.pulumi:kubernetes:(,3.20]
kubernetes-kotlin/build.gradle.kts
Outdated
|
|
||
| dependencies { | ||
| implementation("com.pulumi:pulumi:(,1.0]") | ||
| implementation("com.pulumi:kubernetes:3.19.1") |
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.
Wondering if it would also work with a floating reference like (,3.20]?
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.
yes this work and its better actually
| @@ -0,0 +1,234 @@ | |||
| #!/bin/sh | |||
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.
Pulumi should support running preinstalled gradle if the ./gradlew and gradle/wrapper files are omitted. We currently omit them in the gradle template. I'm curious what is the better default for users, do you believe including gradle wrappers is the better default (in which case we should consider adding that to the plain gradle template also?
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.
yes including the gradlew if is consider better practice in gradle because it allows not to make assumptions about what the user has or not available in the path and also works better with CI, because once run it will be cached under the user profile and it will not pull again.
More detail explanation at: https://tomgregory.com/what-is-the-gradle-wrapper-and-why-should-you-use-it/
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.
Agree with @luistrigueiros including gradlew is considered the best practice
|
Thank you for this contribution! I've left a few questions but we'll be happy to accept once we work through those. It's pretty exciting to have a Kotlin template, even if the APIs we have may be skewing toward idiomatic Java and not idiomatic Kotlin. Note we have a general issue here that is receiving upvotes and may help guide the roadmap: Would love to hear of how you're using Kotlin with what Pulumi can do to make that experience better. |
|
PR is now waiting for a maintainer to run the template acceptance tests. Note for the maintainer: To run the acceptance tests, please comment /run-templates on the PR |
|
@t0yv0 yes I would like to also to make more Kotlin idiomatic but in a second iteration, first get as I need to read up a build of Type safe builders |
|
PR is now waiting for a maintainer to run the template acceptance tests. Note for the maintainer: To run the acceptance tests, please comment /run-templates on the PR |
|
PR is now waiting for a maintainer to run the template acceptance tests. Note for the maintainer: To run the acceptance tests, please comment /run-templates on the PR |
|
I have update the template to use com.pulumi:kubernetes:(,4.0] |
|
Hi folks -- checking in on this one. @t0yv0 Would you be up for re-reviewing so we can bring it to a close, assuming it's something we feel like we should add (or if not, perhaps close)? |
|
Sorry for the long delay here. Checking in again, it seems that it's currently blocked as it blows up with an exception due to a drift in pulumi-kubernetes falling behind on the java sdk-gen. I've opened an issue: |
|
PR is now waiting for a maintainer to run the template acceptance tests. Note for the maintainer: To run the acceptance tests, please comment /run-templates on the PR |
Created kubernetes kotlin template using gradle with kotlin dsl