Skip to content

Commit

Permalink
Child resource cannot be registered by Chart v4 (Java SDK) (#3119)
Browse files Browse the repository at this point in the history
<!--Thanks for your contribution. See [CONTRIBUTING](CONTRIBUTING.md)
    for Pulumi's contribution guidelines.

    Help us merge your changes more quickly by adding more details such
    as labels, milestones, and reviewers.-->

### Proposed changes

<!--Give us a brief description of what you've done and what it solves.
-->

_Blocked on: https://github.com/pulumi/pulumi-java/pull/1394_

Updated Java SDK with better support for resource hydration, per
pulumi/pulumi-java#1393.

### Related issues (optional)

<!--Refer to related PRs or issues: #1234, or 'Fixes #1234' or 'Closes
#1234'.
Or link to full URLs to issues or pull requests in other GitHub
repositories. -->

Closes #3057
  • Loading branch information
EronWright authored Jul 30, 2024
1 parent 2cae86e commit 93b4649
Show file tree
Hide file tree
Showing 403 changed files with 2,019 additions and 798 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
affected resource. (https://github.com/pulumi/pulumi-kubernetes/pull/3128)
- `PersistentVolumeClaims` with a bind mode of `WaitForFirstConsumer` will no
longer hang indefinitely. (https://github.com/pulumi/pulumi-kubernetes/pull/3130)
- [sdk/java] Child resource cannot be registered by Chart v4 (https://github.com/pulumi/pulumi-kubernetes/pull/3119)

## 4.15.0 (July 9, 2024)

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SCHEMA_FILE := provider/cmd/pulumi-resource-kubernetes/schema.json
GOPATH := $(shell go env GOPATH)

JAVA_GEN := pulumi-java-gen
JAVA_GEN_VERSION := v0.12.0
JAVA_GEN_VERSION := v0.13.0

WORKING_DIR := $(shell pwd)

Expand Down
4 changes: 2 additions & 2 deletions sdk/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies {
implementation("com.google.code.findbugs:jsr305:3.0.2")
implementation("com.google.code.gson:gson:2.8.9")
implementation("com.google.guava:guava:32.1.2-jre")
implementation("com.pulumi:pulumi:0.12.0")
implementation("com.pulumi:pulumi:0.13.0")
implementation("net.bytebuddy:byte-buddy:1.14.15")
}

Expand Down Expand Up @@ -152,4 +152,4 @@ if (signingKey) {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mainPublication
}
}
}
9 changes: 8 additions & 1 deletion sdk/java/src/main/java/com/pulumi/kubernetes/Provider.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ public Provider(String name, @Nullable ProviderArgs args) {
* @param options A bag of options that control this resource's behavior.
*/
public Provider(String name, @Nullable ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes", name, args == null ? ProviderArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
super("kubernetes", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()));
}

private static ProviderArgs makeArgs(@Nullable ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? ProviderArgs.Empty : args;
}

private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,17 @@ public MutatingWebhookConfiguration(String name, @Nullable MutatingWebhookConfig
* @param options A bag of options that control this resource's behavior.
*/
public MutatingWebhookConfiguration(String name, @Nullable MutatingWebhookConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfiguration", name, makeArgs(args), makeResourceOptions(options, Codegen.empty()));
super("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfiguration", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()));
}

private MutatingWebhookConfiguration(String name, Output<String> id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfiguration", name, null, makeResourceOptions(options, id));
}

private static MutatingWebhookConfigurationArgs makeArgs(@Nullable MutatingWebhookConfigurationArgs args) {
private static MutatingWebhookConfigurationArgs makeArgs(@Nullable MutatingWebhookConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
var builder = args == null ? MutatingWebhookConfigurationArgs.builder() : MutatingWebhookConfigurationArgs.builder(args);
return builder
.apiVersion("admissionregistration.k8s.io/v1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,17 @@ public MutatingWebhookConfigurationList(String name, MutatingWebhookConfiguratio
* @param options A bag of options that control this resource's behavior.
*/
public MutatingWebhookConfigurationList(String name, MutatingWebhookConfigurationListArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfigurationList", name, makeArgs(args), makeResourceOptions(options, Codegen.empty()));
super("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfigurationList", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()));
}

private MutatingWebhookConfigurationList(String name, Output<String> id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfigurationList", name, null, makeResourceOptions(options, id));
}

private static MutatingWebhookConfigurationListArgs makeArgs(MutatingWebhookConfigurationListArgs args) {
private static MutatingWebhookConfigurationListArgs makeArgs(MutatingWebhookConfigurationListArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
var builder = args == null ? MutatingWebhookConfigurationListArgs.builder() : MutatingWebhookConfigurationListArgs.builder(args);
return builder
.apiVersion("admissionregistration.k8s.io/v1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,17 @@ public MutatingWebhookConfigurationPatch(String name, @Nullable MutatingWebhookC
* @param options A bag of options that control this resource's behavior.
*/
public MutatingWebhookConfigurationPatch(String name, @Nullable MutatingWebhookConfigurationPatchArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfigurationPatch", name, makeArgs(args), makeResourceOptions(options, Codegen.empty()));
super("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfigurationPatch", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()));
}

private MutatingWebhookConfigurationPatch(String name, Output<String> id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfigurationPatch", name, null, makeResourceOptions(options, id));
}

private static MutatingWebhookConfigurationPatchArgs makeArgs(@Nullable MutatingWebhookConfigurationPatchArgs args) {
private static MutatingWebhookConfigurationPatchArgs makeArgs(@Nullable MutatingWebhookConfigurationPatchArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
var builder = args == null ? MutatingWebhookConfigurationPatchArgs.builder() : MutatingWebhookConfigurationPatchArgs.builder(args);
return builder
.apiVersion("admissionregistration.k8s.io/v1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,17 @@ public ValidatingAdmissionPolicy(String name, @Nullable ValidatingAdmissionPolic
* @param options A bag of options that control this resource's behavior.
*/
public ValidatingAdmissionPolicy(String name, @Nullable ValidatingAdmissionPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicy", name, makeArgs(args), makeResourceOptions(options, Codegen.empty()));
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicy", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()));
}

private ValidatingAdmissionPolicy(String name, Output<String> id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicy", name, null, makeResourceOptions(options, id));
}

private static ValidatingAdmissionPolicyArgs makeArgs(@Nullable ValidatingAdmissionPolicyArgs args) {
private static ValidatingAdmissionPolicyArgs makeArgs(@Nullable ValidatingAdmissionPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
var builder = args == null ? ValidatingAdmissionPolicyArgs.builder() : ValidatingAdmissionPolicyArgs.builder(args);
return builder
.apiVersion("admissionregistration.k8s.io/v1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,17 @@ public ValidatingAdmissionPolicyBinding(String name, @Nullable ValidatingAdmissi
* @param options A bag of options that control this resource's behavior.
*/
public ValidatingAdmissionPolicyBinding(String name, @Nullable ValidatingAdmissionPolicyBindingArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyBinding", name, makeArgs(args), makeResourceOptions(options, Codegen.empty()));
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyBinding", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()));
}

private ValidatingAdmissionPolicyBinding(String name, Output<String> id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyBinding", name, null, makeResourceOptions(options, id));
}

private static ValidatingAdmissionPolicyBindingArgs makeArgs(@Nullable ValidatingAdmissionPolicyBindingArgs args) {
private static ValidatingAdmissionPolicyBindingArgs makeArgs(@Nullable ValidatingAdmissionPolicyBindingArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
var builder = args == null ? ValidatingAdmissionPolicyBindingArgs.builder() : ValidatingAdmissionPolicyBindingArgs.builder(args);
return builder
.apiVersion("admissionregistration.k8s.io/v1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,17 @@ public ValidatingAdmissionPolicyBindingList(String name, @Nullable ValidatingAdm
* @param options A bag of options that control this resource's behavior.
*/
public ValidatingAdmissionPolicyBindingList(String name, @Nullable ValidatingAdmissionPolicyBindingListArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyBindingList", name, makeArgs(args), makeResourceOptions(options, Codegen.empty()));
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyBindingList", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()));
}

private ValidatingAdmissionPolicyBindingList(String name, Output<String> id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyBindingList", name, null, makeResourceOptions(options, id));
}

private static ValidatingAdmissionPolicyBindingListArgs makeArgs(@Nullable ValidatingAdmissionPolicyBindingListArgs args) {
private static ValidatingAdmissionPolicyBindingListArgs makeArgs(@Nullable ValidatingAdmissionPolicyBindingListArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
var builder = args == null ? ValidatingAdmissionPolicyBindingListArgs.builder() : ValidatingAdmissionPolicyBindingListArgs.builder(args);
return builder
.apiVersion("admissionregistration.k8s.io/v1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,17 @@ public ValidatingAdmissionPolicyBindingPatch(String name, @Nullable ValidatingAd
* @param options A bag of options that control this resource's behavior.
*/
public ValidatingAdmissionPolicyBindingPatch(String name, @Nullable ValidatingAdmissionPolicyBindingPatchArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyBindingPatch", name, makeArgs(args), makeResourceOptions(options, Codegen.empty()));
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyBindingPatch", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()));
}

private ValidatingAdmissionPolicyBindingPatch(String name, Output<String> id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyBindingPatch", name, null, makeResourceOptions(options, id));
}

private static ValidatingAdmissionPolicyBindingPatchArgs makeArgs(@Nullable ValidatingAdmissionPolicyBindingPatchArgs args) {
private static ValidatingAdmissionPolicyBindingPatchArgs makeArgs(@Nullable ValidatingAdmissionPolicyBindingPatchArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
var builder = args == null ? ValidatingAdmissionPolicyBindingPatchArgs.builder() : ValidatingAdmissionPolicyBindingPatchArgs.builder(args);
return builder
.apiVersion("admissionregistration.k8s.io/v1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,17 @@ public ValidatingAdmissionPolicyList(String name, @Nullable ValidatingAdmissionP
* @param options A bag of options that control this resource's behavior.
*/
public ValidatingAdmissionPolicyList(String name, @Nullable ValidatingAdmissionPolicyListArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyList", name, makeArgs(args), makeResourceOptions(options, Codegen.empty()));
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyList", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()));
}

private ValidatingAdmissionPolicyList(String name, Output<String> id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyList", name, null, makeResourceOptions(options, id));
}

private static ValidatingAdmissionPolicyListArgs makeArgs(@Nullable ValidatingAdmissionPolicyListArgs args) {
private static ValidatingAdmissionPolicyListArgs makeArgs(@Nullable ValidatingAdmissionPolicyListArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
var builder = args == null ? ValidatingAdmissionPolicyListArgs.builder() : ValidatingAdmissionPolicyListArgs.builder(args);
return builder
.apiVersion("admissionregistration.k8s.io/v1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,17 @@ public ValidatingAdmissionPolicyPatch(String name, @Nullable ValidatingAdmission
* @param options A bag of options that control this resource's behavior.
*/
public ValidatingAdmissionPolicyPatch(String name, @Nullable ValidatingAdmissionPolicyPatchArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyPatch", name, makeArgs(args), makeResourceOptions(options, Codegen.empty()));
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyPatch", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()));
}

private ValidatingAdmissionPolicyPatch(String name, Output<String> id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyPatch", name, null, makeResourceOptions(options, id));
}

private static ValidatingAdmissionPolicyPatchArgs makeArgs(@Nullable ValidatingAdmissionPolicyPatchArgs args) {
private static ValidatingAdmissionPolicyPatchArgs makeArgs(@Nullable ValidatingAdmissionPolicyPatchArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
var builder = args == null ? ValidatingAdmissionPolicyPatchArgs.builder() : ValidatingAdmissionPolicyPatchArgs.builder(args);
return builder
.apiVersion("admissionregistration.k8s.io/v1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,17 @@ public ValidatingWebhookConfiguration(String name, @Nullable ValidatingWebhookCo
* @param options A bag of options that control this resource's behavior.
*/
public ValidatingWebhookConfiguration(String name, @Nullable ValidatingWebhookConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfiguration", name, makeArgs(args), makeResourceOptions(options, Codegen.empty()));
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfiguration", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()));
}

private ValidatingWebhookConfiguration(String name, Output<String> id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfiguration", name, null, makeResourceOptions(options, id));
}

private static ValidatingWebhookConfigurationArgs makeArgs(@Nullable ValidatingWebhookConfigurationArgs args) {
private static ValidatingWebhookConfigurationArgs makeArgs(@Nullable ValidatingWebhookConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
var builder = args == null ? ValidatingWebhookConfigurationArgs.builder() : ValidatingWebhookConfigurationArgs.builder(args);
return builder
.apiVersion("admissionregistration.k8s.io/v1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,17 @@ public ValidatingWebhookConfigurationList(String name, ValidatingWebhookConfigur
* @param options A bag of options that control this resource's behavior.
*/
public ValidatingWebhookConfigurationList(String name, ValidatingWebhookConfigurationListArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfigurationList", name, makeArgs(args), makeResourceOptions(options, Codegen.empty()));
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfigurationList", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()));
}

private ValidatingWebhookConfigurationList(String name, Output<String> id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfigurationList", name, null, makeResourceOptions(options, id));
}

private static ValidatingWebhookConfigurationListArgs makeArgs(ValidatingWebhookConfigurationListArgs args) {
private static ValidatingWebhookConfigurationListArgs makeArgs(ValidatingWebhookConfigurationListArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
var builder = args == null ? ValidatingWebhookConfigurationListArgs.builder() : ValidatingWebhookConfigurationListArgs.builder(args);
return builder
.apiVersion("admissionregistration.k8s.io/v1")
Expand Down
Loading

0 comments on commit 93b4649

Please sign in to comment.