Skip to content

Conversation

@luistrigueiros
Copy link

Created kubernetes kotlin template using gradle with kotlin dsl

@github-actions
Copy link

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

@Frassle Frassle requested a review from t0yv0 August 14, 2022 12:09

import com.pulumi.kubernetes.apps_v1.Deployment
import com.pulumi.kubernetes.apps_v1.DeploymentArgs
import com.pulumi.kubernetes.apps_v1.inputs.DeploymentSpecArgs
Copy link
Member

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

Copy link
Author

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]


dependencies {
implementation("com.pulumi:pulumi:(,1.0]")
implementation("com.pulumi:kubernetes:3.19.1")
Copy link
Member

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]?

Copy link
Author

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
Copy link
Member

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?

Copy link
Author

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/

Copy link

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

@t0yv0
Copy link
Member

t0yv0 commented Aug 15, 2022

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:

pulumi/pulumi-java#544

Would love to hear of how you're using Kotlin with what Pulumi can do to make that experience better.

@github-actions
Copy link

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

@luistrigueiros
Copy link
Author

@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

@t0yv0 t0yv0 added this to the 0.77 milestone Aug 25, 2022
@mikhailshilkov mikhailshilkov removed this from the 0.77 milestone Sep 6, 2022
@github-actions
Copy link

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

@github-actions
Copy link

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

@luistrigueiros
Copy link
Author

I have update the template to use com.pulumi:kubernetes:(,4.0]

@cnunciato
Copy link
Contributor

cnunciato commented Jan 13, 2023

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)?

@cnunciato cnunciato added the awaiting-feedback Blocked on input from the author label Jan 18, 2023
@t0yv0 t0yv0 added this to the 0.84 milestone Feb 9, 2023
@AaronFriel AaronFriel modified the milestones: 0.84, 0.85 Feb 13, 2023
@t0yv0
Copy link
Member

t0yv0 commented Mar 10, 2023

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:

pulumi/pulumi-kubernetes#2333

@github-actions
Copy link

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

@mikhailshilkov mikhailshilkov removed this from the 0.85 milestone Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-feedback Blocked on input from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants