Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Oct 17, 2022
1 parent e165791 commit c14a841
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions provider/cmd/pulumi-resource-kubernetes/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
},
"enableServerSideApply": {
"type": "boolean",
"description": "If present and set to true, enable Server-Side Apply mode.\nSee https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details."
"description": "If present and set to false, disable Server-Side Apply mode.\nSee https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details."
},
"kubeconfig": {
"type": "string",
Expand Down Expand Up @@ -57864,7 +57864,7 @@
},
"enableServerSideApply": {
"type": "boolean",
"description": "If present and set to true, enable Server-Side Apply mode.\nSee https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.",
"description": "If present and set to false, disable Server-Side Apply mode.\nSee https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.",
"defaultInfo": {
"environment": [
"PULUMI_K8S_ENABLE_SERVER_SIDE_APPLY"
Expand Down
4 changes: 2 additions & 2 deletions provider/pkg/gen/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func PulumiSchema(swagger map[string]interface{}) pschema.PackageSpec {
DeprecationMessage: "This option has been replaced by `enableServerSideApply`.",
},
"enableServerSideApply": {
Description: "If present and set to true, enable Server-Side Apply mode.\nSee https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.",
Description: "If present and set to false, disable Server-Side Apply mode.\nSee https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.",
TypeSpec: pschema.TypeSpec{Type: "boolean"},
},
"enableReplaceCRD": {
Expand Down Expand Up @@ -157,7 +157,7 @@ func PulumiSchema(swagger map[string]interface{}) pschema.PackageSpec {
"PULUMI_K8S_ENABLE_SERVER_SIDE_APPLY",
},
},
Description: "If present and set to true, enable Server-Side Apply mode.\nSee https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.",
Description: "If present and set to false, disable Server-Side Apply mode.\nSee https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.",
TypeSpec: pschema.TypeSpec{Type: "boolean"},
},
"enableReplaceCRD": {
Expand Down
3 changes: 2 additions & 1 deletion provider/pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ func (k *kubeProvider) Configure(_ context.Context, req *pulumirpc.ConfigureRequ
CurrentContext: vars["kubernetes:config:context"],
}

// TODO: Simplify / factor out the provider flag parsing. Currently lots of error-prone copy-paste code here.

deleteUnreachable := func() bool {
// If the provider flag is set, use that value to determine behavior. This will override the ENV var.
if enabled, exists := vars["kubernetes:config:deleteUnreachable"]; exists {
Expand Down Expand Up @@ -442,7 +444,6 @@ func (k *kubeProvider) Configure(_ context.Context, req *pulumirpc.ConfigureRequ
if enabled, exists := os.LookupEnv("PULUMI_K8S_ENABLE_SERVER_SIDE_APPLY"); exists {
return enabled == trueStr
}
// Default to true.
return true
}
if enableServerSideApply() {
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Config/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void Set(T value)

private static readonly __Value<bool?> _enableServerSideApply = new __Value<bool?>(() => __config.GetBoolean("enableServerSideApply"));
/// <summary>
/// If present and set to true, enable Server-Side Apply mode.
/// If present and set to false, disable Server-Side Apply mode.
/// See https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.
/// </summary>
public static bool? EnableServerSideApply
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Provider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public sealed class ProviderArgs : global::Pulumi.ResourceArgs
public Input<bool>? EnableReplaceCRD { get; set; }

/// <summary>
/// If present and set to true, enable Server-Side Apply mode.
/// If present and set to false, disable Server-Side Apply mode.
/// See https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.
/// </summary>
[Input("enableServerSideApply", json: true)]
Expand Down
2 changes: 1 addition & 1 deletion sdk/go/kubernetes/config/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdk/go/kubernetes/provider.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/java/src/main/java/com/pulumi/kubernetes/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public Optional<Boolean> enableReplaceCRD() {
return Codegen.booleanProp("enableReplaceCRD").config(config).get();
}
/**
* If present and set to true, enable Server-Side Apply mode.
* If present and set to false, disable Server-Side Apply mode.
* See https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ public Optional<Output<Boolean>> enableReplaceCRD() {
}

/**
* If present and set to true, enable Server-Side Apply mode.
* If present and set to false, disable Server-Side Apply mode.
* See https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.
*
*/
@Import(name="enableServerSideApply", json=true)
private @Nullable Output<Boolean> enableServerSideApply;

/**
* @return If present and set to true, enable Server-Side Apply mode.
* @return If present and set to false, disable Server-Side Apply mode.
* See https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.
*
*/
Expand Down Expand Up @@ -471,7 +471,7 @@ public Builder enableReplaceCRD(Boolean enableReplaceCRD) {
}

/**
* @param enableServerSideApply If present and set to true, enable Server-Side Apply mode.
* @param enableServerSideApply If present and set to false, disable Server-Side Apply mode.
* See https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.
*
* @return builder
Expand All @@ -483,7 +483,7 @@ public Builder enableServerSideApply(@Nullable Output<Boolean> enableServerSideA
}

/**
* @param enableServerSideApply If present and set to true, enable Server-Side Apply mode.
* @param enableServerSideApply If present and set to false, disable Server-Side Apply mode.
* See https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.
*
* @return builder
Expand Down
2 changes: 1 addition & 1 deletion sdk/nodejs/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export interface ProviderArgs {
*/
enableReplaceCRD?: pulumi.Input<boolean>;
/**
* If present and set to true, enable Server-Side Apply mode.
* If present and set to false, disable Server-Side Apply mode.
* See https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.
*/
enableServerSideApply?: pulumi.Input<boolean>;
Expand Down
6 changes: 3 additions & 3 deletions sdk/python/pulumi_kubernetes/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(__self__, *,
2. The `PULUMI_K8S_ENABLE_CONFIGMAP_MUTABLE` environment variable.
:param pulumi.Input[bool] enable_dry_run: Deprecated. If present and set to true, enable server-side diff calculations.
:param pulumi.Input[bool] enable_replace_crd: Obsolete. This option has no effect.
:param pulumi.Input[bool] enable_server_side_apply: If present and set to true, enable Server-Side Apply mode.
:param pulumi.Input[bool] enable_server_side_apply: If present and set to false, disable Server-Side Apply mode.
See https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.
:param pulumi.Input['HelmReleaseSettingsArgs'] helm_release_settings: Options to configure the Helm Release resource.
:param pulumi.Input['KubeClientSettingsArgs'] kube_client_settings: Options for tuning the Kubernetes client used by a Provider.
Expand Down Expand Up @@ -194,7 +194,7 @@ def enable_replace_crd(self, value: Optional[pulumi.Input[bool]]):
@pulumi.getter(name="enableServerSideApply")
def enable_server_side_apply(self) -> Optional[pulumi.Input[bool]]:
"""
If present and set to true, enable Server-Side Apply mode.
If present and set to false, disable Server-Side Apply mode.
See https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.
"""
return pulumi.get(self, "enable_server_side_apply")
Expand Down Expand Up @@ -336,7 +336,7 @@ def __init__(__self__,
2. The `PULUMI_K8S_ENABLE_CONFIGMAP_MUTABLE` environment variable.
:param pulumi.Input[bool] enable_dry_run: Deprecated. If present and set to true, enable server-side diff calculations.
:param pulumi.Input[bool] enable_replace_crd: Obsolete. This option has no effect.
:param pulumi.Input[bool] enable_server_side_apply: If present and set to true, enable Server-Side Apply mode.
:param pulumi.Input[bool] enable_server_side_apply: If present and set to false, disable Server-Side Apply mode.
See https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.
:param pulumi.Input[pulumi.InputType['HelmReleaseSettingsArgs']] helm_release_settings: Options to configure the Helm Release resource.
:param pulumi.Input[pulumi.InputType['KubeClientSettingsArgs']] kube_client_settings: Options for tuning the Kubernetes client used by a Provider.
Expand Down

0 comments on commit c14a841

Please sign in to comment.