Skip to content

Commit

Permalink
Add support for k8s 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Nov 5, 2019
1 parent 46716d8 commit 425bab9
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PROVIDER := pulumi-resource-${PACK}
CODEGEN := pulumi-gen-${PACK}
VERSION ?= $(shell scripts/get-version)
PYPI_VERSION := $(shell scripts/get-py-version)
KUBE_VERSION ?= v1.16.0
KUBE_VERSION ?= v1.18.0-alpha.0
SWAGGER_URL ?= https://github.com/kubernetes/kubernetes/raw/${KUBE_VERSION}/api/openapi-spec/swagger.json
OPENAPI_DIR := pkg/gen/openapi-specs
OPENAPI_FILE := ${OPENAPI_DIR}/swagger-${KUBE_VERSION}.json
Expand Down
5 changes: 4 additions & 1 deletion sdk/nodejs/discovery/v1alpha1/EndpointSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ import { getVersion } from "../../version";
export class EndpointSlice extends pulumi.CustomResource {
/**
* addressType specifies the type of address carried by this EndpointSlice. All addresses in
* this slice must be the same type. Default is IP
* this slice must be the same type. The following address types are currently supported: *
* IP: Represents an IP Address. This can include both IPv4 and IPv6
* addresses.
* * FQDN: Represents a Fully Qualified Domain Name. Default is IP
*/
public readonly addressType: pulumi.Output<string>;

Expand Down
53 changes: 45 additions & 8 deletions sdk/nodejs/types/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ export namespace apiextensions {

/**
* scope indicates whether the defined custom resource is cluster- or namespace-scoped.
* Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.
* Allowed values are `Cluster` and `Namespaced`.
*/
scope: pulumi.Input<string>

Expand Down Expand Up @@ -1729,6 +1729,19 @@ export namespace apiextensions {
*/
x_kubernetes_list_type?: pulumi.Input<string>

/**
* x-kubernetes-map-type annotates an object to further describe its topology. This extension
* must only be used when type is object and may have 2 possible values:
*
* 1) `granular`:
* These maps are actual maps (key-value pairs) and each fields are independent
* from each other (they can each be manipulated by separate actors). This is
* the default behaviour for all maps.
* 2) `atomic`: the list is treated as a single entity, like a scalar.
* Atomic maps will be entirely replaced when updated.
*/
x_kubernetes_map_type?: pulumi.Input<string>

/**
* x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields
* which are not specified in the validation schema. This affects fields recursively, but
Expand Down Expand Up @@ -2474,6 +2487,19 @@ export namespace apiextensions {
*/
x_kubernetes_list_type?: pulumi.Input<string>

/**
* x-kubernetes-map-type annotates an object to further describe its topology. This extension
* must only be used when type is object and may have 2 possible values:
*
* 1) `granular`:
* These maps are actual maps (key-value pairs) and each fields are independent
* from each other (they can each be manipulated by separate actors). This is
* the default behaviour for all maps.
* 2) `atomic`: the list is treated as a single entity, like a scalar.
* Atomic maps will be entirely replaced when updated.
*/
x_kubernetes_map_type?: pulumi.Input<string>

/**
* x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields
* which are not specified in the validation schema. This affects fields recursively, but
Expand Down Expand Up @@ -16391,7 +16417,7 @@ export namespace core {
* Expanded path within the volume from which the container's volume should be mounted.
* Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded
* using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath
* are mutually exclusive. This field is beta in 1.15.
* are mutually exclusive.
*/
subPathExpr?: pulumi.Input<string>

Expand Down Expand Up @@ -16526,10 +16552,10 @@ export namespace discovery {
export interface Endpoint {
/**
* addresses of this endpoint. The contents of this field are interpreted according to the
* corresponding EndpointSlice addressType field. This allows for cases like dual-stack (IPv4
* and IPv6) networking. Consumers (e.g. kube-proxy) must handle different types of addresses
* in the context of their own capabilities. This must contain at least one address but no
* more than 100.
* corresponding EndpointSlice addressType field. This allows for cases like dual-stack
* networking where both IPv4 and IPv6 addresses would be included with the IP addressType.
* Consumers (e.g. kube-proxy) must handle different types of addresses in the context of
* their own capabilities. This must contain at least one address but no more than 100.
*/
addresses: pulumi.Input<pulumi.Input<string>[]>

Expand Down Expand Up @@ -16625,7 +16651,10 @@ export namespace discovery {

/**
* addressType specifies the type of address carried by this EndpointSlice. All addresses in
* this slice must be the same type. Default is IP
* this slice must be the same type. The following address types are currently supported: *
* IP: Represents an IP Address. This can include both IPv4 and IPv6
* addresses.
* * FQDN: Represents a Fully Qualified Domain Name. Default is IP
*/
addressType?: pulumi.Input<string>

Expand Down Expand Up @@ -19179,6 +19208,14 @@ export namespace meta {
* Must be empty before the object is deleted from the registry. Each entry is an identifier
* for the responsible component that will remove the entry from the list. If the
* deletionTimestamp of the object is non-nil, entries in this list can only be removed.
* Finalizers may be processed and removed in any order. Order is NOT enforced because it
* introduces significant risk of stuck finalizers. finalizers is a shared field, any actor
* with permission can reorder it. If the finalizer list is processed in order, then this can
* lead to a situation in which the component responsible for the first finalizer in the list
* is waiting for a signal (field value, external system, or other) produced by a component
* responsible for a finalizer later in the list, resulting in a deadlock. Without enforced
* ordering finalizers are free to order amongst themselves and are not vulnerable to ordering
* changes in the list.
*/
finalizers?: pulumi.Input<pulumi.Input<string>[]>

Expand Down Expand Up @@ -20609,7 +20646,7 @@ export namespace policy {

/**
* Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and
* other status informatio is valid only if observedGeneration equals to PDB's object
* other status information is valid only if observedGeneration equals to PDB's object
* generation.
*/
observedGeneration?: pulumi.Input<number>
Expand Down
53 changes: 45 additions & 8 deletions sdk/nodejs/types/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ export namespace apiextensions {

/**
* scope indicates whether the defined custom resource is cluster- or namespace-scoped.
* Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.
* Allowed values are `Cluster` and `Namespaced`.
*/
readonly scope: string

Expand Down Expand Up @@ -1678,6 +1678,19 @@ export namespace apiextensions {
*/
readonly x_kubernetes_list_type: string

/**
* x-kubernetes-map-type annotates an object to further describe its topology. This extension
* must only be used when type is object and may have 2 possible values:
*
* 1) `granular`:
* These maps are actual maps (key-value pairs) and each fields are independent
* from each other (they can each be manipulated by separate actors). This is
* the default behaviour for all maps.
* 2) `atomic`: the list is treated as a single entity, like a scalar.
* Atomic maps will be entirely replaced when updated.
*/
readonly x_kubernetes_map_type: string

/**
* x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields
* which are not specified in the validation schema. This affects fields recursively, but
Expand Down Expand Up @@ -2413,6 +2426,19 @@ export namespace apiextensions {
*/
readonly x_kubernetes_list_type: string

/**
* x-kubernetes-map-type annotates an object to further describe its topology. This extension
* must only be used when type is object and may have 2 possible values:
*
* 1) `granular`:
* These maps are actual maps (key-value pairs) and each fields are independent
* from each other (they can each be manipulated by separate actors). This is
* the default behaviour for all maps.
* 2) `atomic`: the list is treated as a single entity, like a scalar.
* Atomic maps will be entirely replaced when updated.
*/
readonly x_kubernetes_map_type: string

/**
* x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields
* which are not specified in the validation schema. This affects fields recursively, but
Expand Down Expand Up @@ -15866,7 +15892,7 @@ export namespace core {
* Expanded path within the volume from which the container's volume should be mounted.
* Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded
* using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath
* are mutually exclusive. This field is beta in 1.15.
* are mutually exclusive.
*/
readonly subPathExpr: string

Expand Down Expand Up @@ -15995,10 +16021,10 @@ export namespace discovery {
export interface Endpoint {
/**
* addresses of this endpoint. The contents of this field are interpreted according to the
* corresponding EndpointSlice addressType field. This allows for cases like dual-stack (IPv4
* and IPv6) networking. Consumers (e.g. kube-proxy) must handle different types of addresses
* in the context of their own capabilities. This must contain at least one address but no
* more than 100.
* corresponding EndpointSlice addressType field. This allows for cases like dual-stack
* networking where both IPv4 and IPv6 addresses would be included with the IP addressType.
* Consumers (e.g. kube-proxy) must handle different types of addresses in the context of
* their own capabilities. This must contain at least one address but no more than 100.
*/
readonly addresses: string[]

Expand Down Expand Up @@ -16085,7 +16111,10 @@ export namespace discovery {
export interface EndpointSlice {
/**
* addressType specifies the type of address carried by this EndpointSlice. All addresses in
* this slice must be the same type. Default is IP
* this slice must be the same type. The following address types are currently supported: *
* IP: Represents an IP Address. This can include both IPv4 and IPv6
* addresses.
* * FQDN: Represents a Fully Qualified Domain Name. Default is IP
*/
readonly addressType: string

Expand Down Expand Up @@ -18534,6 +18563,14 @@ export namespace meta {
* Must be empty before the object is deleted from the registry. Each entry is an identifier
* for the responsible component that will remove the entry from the list. If the
* deletionTimestamp of the object is non-nil, entries in this list can only be removed.
* Finalizers may be processed and removed in any order. Order is NOT enforced because it
* introduces significant risk of stuck finalizers. finalizers is a shared field, any actor
* with permission can reorder it. If the finalizer list is processed in order, then this can
* lead to a situation in which the component responsible for the first finalizer in the list
* is waiting for a signal (field value, external system, or other) produced by a component
* responsible for a finalizer later in the list, resulting in a deadlock. Without enforced
* ordering finalizers are free to order amongst themselves and are not vulnerable to ordering
* changes in the list.
*/
readonly finalizers: string[]

Expand Down Expand Up @@ -19897,7 +19934,7 @@ export namespace policy {

/**
* Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and
* other status informatio is valid only if observedGeneration equals to PDB's object
* other status information is valid only if observedGeneration equals to PDB's object
* generation.
*/
readonly observedGeneration: number
Expand Down
11 changes: 9 additions & 2 deletions sdk/python/pulumi_kubernetes/discovery/v1alpha1/EndpointSlice.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ class EndpointSlice(pulumi.CustomResource):
address_type: pulumi.Output[str]
"""
addressType specifies the type of address carried by this EndpointSlice. All addresses in this
slice must be the same type. Default is IP
slice must be the same type. The following address types are currently supported: * IP:
Represents an IP Address. This can include both IPv4 and IPv6
addresses.
* FQDN: Represents a Fully Qualified Domain Name. Default is IP
"""

endpoints: pulumi.Output[list]
Expand Down Expand Up @@ -66,7 +69,11 @@ def __init__(self, resource_name, opts=None, endpoints=None, address_type=None,
:param pulumi.Input[list] endpoints: endpoints is a list of unique endpoints in this slice. Each slice may include a
maximum of 1000 endpoints.
:param pulumi.Input[str] address_type: addressType specifies the type of address carried by this EndpointSlice. All
addresses in this slice must be the same type. Default is IP
addresses in this slice must be the same type. The following address types are
currently supported: * IP: Represents an IP Address. This can include both IPv4 and
IPv6
addresses.
* FQDN: Represents a Fully Qualified Domain Name. Default is IP
:param pulumi.Input[dict] metadata: Standard object's metadata.
:param pulumi.Input[list] ports: ports specifies the list of network ports exposed by each endpoint in this slice.
Each port must have a unique name. When ports is empty, it indicates that there are
Expand Down

0 comments on commit 425bab9

Please sign in to comment.