Skip to content

Commit

Permalink
Upgrade to Pulumi v2.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stack72 committed Aug 26, 2020
1 parent b3ffacd commit 65472e5
Show file tree
Hide file tree
Showing 342 changed files with 98,158 additions and 4,804 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## HEAD (Unreleased)

### Improvements

- Upgrade to Pulumi v2.9.0, which adds type annotations and input/output classes to Python (https://github.com/pulumi/pulumi-kubernetes/pull/1276)

## 2.5.0 (August 26, 2020)

### Improvements
Expand Down
8 changes: 4 additions & 4 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ go 1.14
require (
github.com/ahmetb/go-linq v3.0.0+incompatible
github.com/evanphx/json-patch v4.5.0+incompatible
github.com/golang/protobuf v1.3.5
github.com/golang/protobuf v1.4.2
github.com/googleapis/gnostic v0.2.0
github.com/imdario/mergo v0.3.8
github.com/onsi/ginkgo v1.12.0 // indirect
github.com/onsi/gomega v1.9.0 // indirect
github.com/pkg/errors v0.9.1
github.com/pulumi/pulumi/pkg/v2 v2.8.2
github.com/pulumi/pulumi/sdk/v2 v2.8.2
github.com/pulumi/pulumi/pkg/v2 v2.9.1-0.20200825190708-910aa96016cd
github.com/pulumi/pulumi/sdk/v2 v2.9.1-0.20200825190708-910aa96016cd
github.com/stretchr/testify v1.6.1
google.golang.org/grpc v1.28.0
google.golang.org/grpc v1.29.1
k8s.io/api v0.18.8
k8s.io/apimachinery v0.18.8
k8s.io/cli-runtime v0.18.8
Expand Down
145 changes: 117 additions & 28 deletions provider/go.sum

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions sdk/python/pulumi_kubernetes/_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"container_port": "containerPort",
"container_runtime_version": "containerRuntimeVersion",
"container_statuses": "containerStatuses",
"continue_": "continue",
"controller_expand_secret_ref": "controllerExpandSecretRef",
"controller_publish_secret_ref": "controllerPublishSecretRef",
"conversion_review_versions": "conversionReviewVersions",
Expand Down Expand Up @@ -122,15 +123,18 @@
"downward_api": "downwardAPI",
"dry_run": "dryRun",
"empty_dir": "emptyDir",
"enable_dry_run": "enableDryRun",
"enable_service_links": "enableServiceLinks",
"endpoints_namespace": "endpointsNamespace",
"env_from": "envFrom",
"ephemeral_container_statuses": "ephemeralContainerStatuses",
"ephemeral_containers": "ephemeralContainers",
"evaluation_error": "evaluationError",
"event_time": "eventTime",
"except_": "except",
"exclusive_maximum": "exclusiveMaximum",
"exclusive_minimum": "exclusiveMinimum",
"exec_": "exec",
"exit_code": "exitCode",
"expected_pods": "expectedPods",
"expiration_seconds": "expirationSeconds",
Expand All @@ -151,6 +155,7 @@
"first_timestamp": "firstTimestamp",
"flex_volume": "flexVolume",
"forbidden_sysctls": "forbiddenSysctls",
"from_": "from",
"fs_group": "fsGroup",
"fs_group_change_policy": "fsGroupChangePolicy",
"fs_group_policy": "fsGroupPolicy",
Expand Down Expand Up @@ -267,6 +272,7 @@
"non_resource_attributes": "nonResourceAttributes",
"non_resource_rules": "nonResourceRules",
"non_resource_ur_ls": "nonResourceURLs",
"not_": "not",
"not_ready_addresses": "notReadyAddresses",
"number_available": "numberAvailable",
"number_misscheduled": "numberMisscheduled",
Expand Down Expand Up @@ -327,6 +333,7 @@
"reclaim_policy": "reclaimPolicy",
"reinvocation_policy": "reinvocationPolicy",
"remaining_item_count": "remainingItemCount",
"render_yaml_to_directory": "renderYamlToDirectory",
"renew_time": "renewTime",
"reporting_component": "reportingComponent",
"reporting_controller": "reportingController",
Expand Down Expand Up @@ -411,6 +418,7 @@
"success_threshold": "successThreshold",
"successful_jobs_history_limit": "successfulJobsHistoryLimit",
"supplemental_groups": "supplementalGroups",
"suppress_deprecation_warnings": "suppressDeprecationWarnings",
"system_uuid": "systemUUID",
"target_average_utilization": "targetAverageUtilization",
"target_average_value": "targetAverageValue",
Expand Down Expand Up @@ -538,6 +546,7 @@
"containerPort": "container_port",
"containerRuntimeVersion": "container_runtime_version",
"containerStatuses": "container_statuses",
"continue": "continue_",
"controllerExpandSecretRef": "controller_expand_secret_ref",
"controllerPublishSecretRef": "controller_publish_secret_ref",
"conversionReviewVersions": "conversion_review_versions",
Expand Down Expand Up @@ -585,15 +594,18 @@
"downwardAPI": "downward_api",
"dryRun": "dry_run",
"emptyDir": "empty_dir",
"enableDryRun": "enable_dry_run",
"enableServiceLinks": "enable_service_links",
"endpointsNamespace": "endpoints_namespace",
"envFrom": "env_from",
"ephemeralContainerStatuses": "ephemeral_container_statuses",
"ephemeralContainers": "ephemeral_containers",
"evaluationError": "evaluation_error",
"eventTime": "event_time",
"except": "except_",
"exclusiveMaximum": "exclusive_maximum",
"exclusiveMinimum": "exclusive_minimum",
"exec": "exec_",
"exitCode": "exit_code",
"expectedPods": "expected_pods",
"expirationSeconds": "expiration_seconds",
Expand All @@ -614,6 +626,7 @@
"firstTimestamp": "first_timestamp",
"flexVolume": "flex_volume",
"forbiddenSysctls": "forbidden_sysctls",
"from": "from_",
"fsGroup": "fs_group",
"fsGroupChangePolicy": "fs_group_change_policy",
"fsGroupPolicy": "fs_group_policy",
Expand Down Expand Up @@ -730,6 +743,7 @@
"nonResourceAttributes": "non_resource_attributes",
"nonResourceRules": "non_resource_rules",
"nonResourceURLs": "non_resource_ur_ls",
"not": "not_",
"notReadyAddresses": "not_ready_addresses",
"numberAvailable": "number_available",
"numberMisscheduled": "number_misscheduled",
Expand Down Expand Up @@ -790,6 +804,7 @@
"reclaimPolicy": "reclaim_policy",
"reinvocationPolicy": "reinvocation_policy",
"remainingItemCount": "remaining_item_count",
"renderYamlToDirectory": "render_yaml_to_directory",
"renewTime": "renew_time",
"reportingComponent": "reporting_component",
"reportingController": "reporting_controller",
Expand Down Expand Up @@ -874,6 +889,7 @@
"successThreshold": "success_threshold",
"successfulJobsHistoryLimit": "successful_jobs_history_limit",
"supplementalGroups": "supplemental_groups",
"suppressDeprecationWarnings": "suppress_deprecation_warnings",
"systemUUID": "system_uuid",
"targetAverageUtilization": "target_average_utilization",
"targetAverageValue": "target_average_value",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,35 @@
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
from ... import _utilities, _tables
from . import outputs
from ... import meta as _meta
from ._inputs import *

__all__ = ['MutatingWebhookConfiguration']


class MutatingWebhookConfiguration(pulumi.CustomResource):
api_version: pulumi.Output[str]
"""
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
"""
kind: pulumi.Output[str]
"""
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
"""
metadata: pulumi.Output[dict]
"""
Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
"""
webhooks: pulumi.Output[list]
"""
Webhooks is a list of webhooks and the affected resources and operations.
"""
def __init__(__self__, resource_name, opts=None, api_version=None, kind=None, metadata=None, webhooks=None, __props__=None, __name__=None, __opts__=None):
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
api_version: Optional[pulumi.Input[str]] = None,
kind: Optional[pulumi.Input[str]] = None,
metadata: Optional[pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']]] = None,
webhooks: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['MutatingWebhookArgs']]]]] = None,
__props__=None,
__name__=None,
__opts__=None):
"""
MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] api_version: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
:param pulumi.Input[str] kind: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
:param pulumi.Input[dict] metadata: Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
:param pulumi.Input[list] webhooks: Webhooks is a list of webhooks and the affected resources and operations.
:param pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']] metadata: Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
:param pulumi.Input[List[pulumi.Input[pulumi.InputType['MutatingWebhookArgs']]]] webhooks: Webhooks is a list of webhooks and the affected resources and operations.
"""
if __name__ is not None:
warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
Expand Down Expand Up @@ -67,13 +65,15 @@ def __init__(__self__, resource_name, opts=None, api_version=None, kind=None, me
opts)

@staticmethod
def get(resource_name, id, opts=None):
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None) -> 'MutatingWebhookConfiguration':
"""
Get an existing MutatingWebhookConfiguration resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param str id: The unique provider ID of the resource to lookup.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
Expand All @@ -82,8 +82,41 @@ def get(resource_name, id, opts=None):

return MutatingWebhookConfiguration(resource_name, opts=opts, __props__=__props__)

@property
@pulumi.getter(name="apiVersion")
def api_version(self) -> pulumi.Output[Optional[str]]:
"""
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
"""
return pulumi.get(self, "api_version")

@property
@pulumi.getter
def kind(self) -> pulumi.Output[Optional[str]]:
"""
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
"""
return pulumi.get(self, "kind")

@property
@pulumi.getter
def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ObjectMeta']]:
"""
Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
"""
return pulumi.get(self, "metadata")

@property
@pulumi.getter
def webhooks(self) -> pulumi.Output[Optional[List['outputs.MutatingWebhook']]]:
"""
Webhooks is a list of webhooks and the affected resources and operations.
"""
return pulumi.get(self, "webhooks")

def translate_output_property(self, prop):
return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

def translate_input_property(self, prop):
return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,35 @@
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
from ... import _utilities, _tables
from . import outputs
from ... import meta as _meta
from ._inputs import *

__all__ = ['MutatingWebhookConfigurationList']


class MutatingWebhookConfigurationList(pulumi.CustomResource):
api_version: pulumi.Output[str]
"""
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
"""
items: pulumi.Output[list]
"""
List of MutatingWebhookConfiguration.
"""
kind: pulumi.Output[str]
"""
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
"""
metadata: pulumi.Output[dict]
"""
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
"""
def __init__(__self__, resource_name, opts=None, api_version=None, items=None, kind=None, metadata=None, __props__=None, __name__=None, __opts__=None):
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
api_version: Optional[pulumi.Input[str]] = None,
items: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['MutatingWebhookConfigurationArgs']]]]] = None,
kind: Optional[pulumi.Input[str]] = None,
metadata: Optional[pulumi.Input[pulumi.InputType['_meta.v1.ListMetaArgs']]] = None,
__props__=None,
__name__=None,
__opts__=None):
"""
MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] api_version: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
:param pulumi.Input[list] items: List of MutatingWebhookConfiguration.
:param pulumi.Input[List[pulumi.Input[pulumi.InputType['MutatingWebhookConfigurationArgs']]]] items: List of MutatingWebhookConfiguration.
:param pulumi.Input[str] kind: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
:param pulumi.Input[dict] metadata: Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
:param pulumi.Input[pulumi.InputType['_meta.v1.ListMetaArgs']] metadata: Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
"""
if __name__ is not None:
warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
Expand Down Expand Up @@ -67,13 +65,15 @@ def __init__(__self__, resource_name, opts=None, api_version=None, items=None, k
opts)

@staticmethod
def get(resource_name, id, opts=None):
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None) -> 'MutatingWebhookConfigurationList':
"""
Get an existing MutatingWebhookConfigurationList resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param str id: The unique provider ID of the resource to lookup.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
Expand All @@ -82,8 +82,41 @@ def get(resource_name, id, opts=None):

return MutatingWebhookConfigurationList(resource_name, opts=opts, __props__=__props__)

@property
@pulumi.getter(name="apiVersion")
def api_version(self) -> pulumi.Output[Optional[str]]:
"""
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
"""
return pulumi.get(self, "api_version")

@property
@pulumi.getter
def items(self) -> pulumi.Output[List['outputs.MutatingWebhookConfiguration']]:
"""
List of MutatingWebhookConfiguration.
"""
return pulumi.get(self, "items")

@property
@pulumi.getter
def kind(self) -> pulumi.Output[Optional[str]]:
"""
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
"""
return pulumi.get(self, "kind")

@property
@pulumi.getter
def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ListMeta']]:
"""
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
"""
return pulumi.get(self, "metadata")

def translate_output_property(self, prop):
return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

def translate_input_property(self, prop):
return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

Loading

0 comments on commit 65472e5

Please sign in to comment.