Skip to content

Commit

Permalink
Add support for Kubernetes v1.14.0 (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
hausdorff authored and lblackstone committed Mar 25, 2019
1 parent cd7ad30 commit 92867d4
Show file tree
Hide file tree
Showing 90 changed files with 4,482 additions and 877 deletions.
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 0.21.2 (Unreleased)
## 0.22.1 (Unreleased)

### Major changes

Expand All @@ -12,6 +12,20 @@

- None

## 0.22.0 (March 25, 2019)

### Major changes

- Add support for Kubernetes v1.14.0 (https://github.com/pulumi/pulumi-kubernetes/pull/371)

### Improvements

- None

### Bug fixes

- None

## 0.21.1 (March 18, 2019)

### Major changes
Expand Down
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.13.4
KUBE_VERSION ?= v1.14.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
3 changes: 3 additions & 0 deletions pkg/gen/typegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ func makeTypescriptType(prop map[string]interface{}, opts groupOpts) string {
apiextensionsV1beta1 = "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1"
quantity = "io.k8s.apimachinery.pkg.api.resource.Quantity"
intOrString = "io.k8s.apimachinery.pkg.util.intstr.IntOrString"
v1Fields = "io.k8s.apimachinery.pkg.apis.meta.v1.Fields"
v1Time = "io.k8s.apimachinery.pkg.apis.meta.v1.Time"
v1MicroTime = "io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime"
v1beta1JSONSchemaPropsOrBool = apiextensionsV1beta1 + ".JSONSchemaPropsOrBool"
Expand All @@ -323,6 +324,8 @@ func makeTypescriptType(prop map[string]interface{}, opts groupOpts) string {
return stringT
case intOrString:
return "number | string"
case v1Fields:
return object
case v1Time, v1MicroTime:
// TODO: Automatically deserialized with `DateConstructor`.
return stringT
Expand Down
3 changes: 1 addition & 2 deletions sdk/nodejs/admissionregistration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// *** Do not edit by hand unless you're certain you know what you are doing! ***

// Import versions:
import * as v1alpha1 from "./v1alpha1/index";
import * as v1beta1 from "./v1beta1/index";

// Export sub-modules
export { v1alpha1, v1beta1, };
export { v1beta1, };

2 changes: 1 addition & 1 deletion sdk/nodejs/apps/v1beta2/ControllerRevision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import * as outputApi from "../../types/output";

/**
* Standard object's metadata. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*/
public readonly metadata: pulumi.Output<outputApi.meta.v1.ObjectMeta>;

Expand Down
3 changes: 2 additions & 1 deletion sdk/nodejs/apps/v1beta2/ControllerRevisionList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ import * as outputApi from "../../types/output";
public readonly kind: pulumi.Output<"ControllerRevisionList">;

/**
* More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
* More info:
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*/
public readonly metadata: pulumi.Output<outputApi.meta.v1.ListMeta>;

Expand Down
6 changes: 3 additions & 3 deletions sdk/nodejs/apps/v1beta2/DaemonSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ import * as outputApi from "../../types/output";

/**
* Standard object's metadata. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*/
public readonly metadata: pulumi.Output<outputApi.meta.v1.ObjectMeta>;

/**
* The desired behavior of this daemon set. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
*/
public readonly spec: pulumi.Output<outputApi.apps.v1beta2.DaemonSetSpec>;

/**
* The current status of this daemon set. This data may be out of date by some window of time.
* Populated by the system. Read-only. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
*/
public readonly status: pulumi.Output<outputApi.apps.v1beta2.DaemonSetStatus>;

Expand Down
2 changes: 1 addition & 1 deletion sdk/nodejs/apps/v1beta2/DaemonSetList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import * as outputApi from "../../types/output";

/**
* Standard list metadata. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*/
public readonly metadata: pulumi.Output<outputApi.meta.v1.ListMeta>;

Expand Down
6 changes: 3 additions & 3 deletions sdk/nodejs/apps/v1beta2/ReplicaSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ import * as outputApi from "../../types/output";
/**
* If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s)
* that the ReplicaSet manages. Standard object's metadata. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*/
public readonly metadata: pulumi.Output<outputApi.meta.v1.ObjectMeta>;

/**
* Spec defines the specification of the desired behavior of the ReplicaSet. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
*/
public readonly spec: pulumi.Output<outputApi.apps.v1beta2.ReplicaSetSpec>;

/**
* Status is the most recently observed status of the ReplicaSet. This data may be out of date
* by some window of time. Populated by the system. Read-only. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
*/
public readonly status: pulumi.Output<outputApi.apps.v1beta2.ReplicaSetStatus>;

Expand Down
2 changes: 1 addition & 1 deletion sdk/nodejs/apps/v1beta2/ReplicaSetList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import * as outputApi from "../../types/output";

/**
* Standard list metadata. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
public readonly metadata: pulumi.Output<outputApi.meta.v1.ListMeta>;

Expand Down
3 changes: 2 additions & 1 deletion sdk/nodejs/coordination/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
// *** Do not edit by hand unless you're certain you know what you are doing! ***

// Import versions:
import * as v1 from "./v1/index";
import * as v1beta1 from "./v1beta1/index";

// Export sub-modules
export { v1beta1, };
export { v1, v1beta1, };

Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,38 @@ import * as inputApi from "../../types/input";
import * as outputApi from "../../types/output";

/**
* InitializerConfiguration describes the configuration of initializers.
* Lease defines a lease concept.
*/
export class InitializerConfiguration extends pulumi.CustomResource {
export class Lease extends pulumi.CustomResource {
/**
* 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/api-conventions.md#resources
*/
public readonly apiVersion: pulumi.Output<"admissionregistration.k8s.io/v1alpha1">;

/**
* Initializers is a list of resources and their default initializers Order-sensitive. When
* merging multiple InitializerConfigurations, we sort the initializers from different
* InitializerConfigurations by the name of the InitializerConfigurations; the order of the
* initializers from the same InitializerConfiguration is preserved.
*/
public readonly initializers: pulumi.Output<outputApi.admissionregistration.v1alpha1.Initializer[]>;
public readonly apiVersion: pulumi.Output<"coordination.k8s.io/v1">;

/**
* 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/api-conventions.md#types-kinds
*/
public readonly kind: pulumi.Output<"InitializerConfiguration">;
public readonly kind: pulumi.Output<"Lease">;

/**
* Standard object metadata; More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
* More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
*/
public readonly metadata: pulumi.Output<outputApi.meta.v1.ObjectMeta>;

/**
* Get the state of an existing `InitializerConfiguration` resource, as identified by `id`.
* Specification of the Lease. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
*/
public readonly spec: pulumi.Output<outputApi.coordination.v1.LeaseSpec>;

/**
* Get the state of an existing `Lease` resource, as identified by `id`.
* Typically this ID is of the form <namespace>/<name>; if <namespace> is omitted, then (per
* Kubernetes convention) the ID becomes default/<name>.
*
Expand All @@ -51,27 +48,27 @@ import * as outputApi from "../../types/output";
* <namespace>/<name> or <name>.
* @param opts Uniquely specifies a CustomResource to select.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): InitializerConfiguration {
return new InitializerConfiguration(name, undefined, { ...opts, id: id });
public static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Lease {
return new Lease(name, undefined, { ...opts, id: id });
}

public getInputs(): inputApi.admissionregistration.v1alpha1.InitializerConfiguration { return this.__inputs; }
private readonly __inputs: inputApi.admissionregistration.v1alpha1.InitializerConfiguration;
public getInputs(): inputApi.coordination.v1.Lease { return this.__inputs; }
private readonly __inputs: inputApi.coordination.v1.Lease;

/**
* Create a admissionregistration.v1alpha1.InitializerConfiguration resource with the given unique name, arguments, and options.
* Create a coordination.v1.Lease resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: inputApi.admissionregistration.v1alpha1.InitializerConfiguration, opts?: pulumi.CustomResourceOptions) {
constructor(name: string, args?: inputApi.coordination.v1.Lease, opts?: pulumi.CustomResourceOptions) {
let inputs: pulumi.Inputs = {};
inputs["apiVersion"] = "admissionregistration.k8s.io/v1alpha1";
inputs["initializers"] = args && args.initializers || undefined;
inputs["kind"] = "InitializerConfiguration";
inputs["apiVersion"] = "coordination.k8s.io/v1";
inputs["kind"] = "Lease";
inputs["metadata"] = args && args.metadata || undefined;
super("kubernetes:admissionregistration.k8s.io/v1alpha1:InitializerConfiguration", name, inputs, opts);
inputs["spec"] = args && args.spec || undefined;
super("kubernetes:coordination.k8s.io/v1:Lease", name, inputs, opts);
this.__inputs = <any>args;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@ import * as inputApi from "../../types/input";
import * as outputApi from "../../types/output";

/**
* InitializerConfigurationList is a list of InitializerConfiguration.
* LeaseList is a list of Lease objects.
*/
export class InitializerConfigurationList extends pulumi.CustomResource {
export class LeaseList extends pulumi.CustomResource {
/**
* 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/api-conventions.md#resources
*/
public readonly apiVersion: pulumi.Output<"admissionregistration.k8s.io/v1alpha1">;
public readonly apiVersion: pulumi.Output<"coordination.k8s.io/v1">;

/**
* List of InitializerConfiguration.
* Items is a list of schema objects.
*/
public readonly items: pulumi.Output<outputApi.admissionregistration.v1alpha1.InitializerConfiguration[]>;
public readonly items: pulumi.Output<outputApi.coordination.v1.Lease[]>;

/**
* 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/api-conventions.md#types-kinds
*/
public readonly kind: pulumi.Output<"InitializerConfigurationList">;
public readonly kind: pulumi.Output<"LeaseList">;

/**
* Standard list metadata. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
* https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
*/
public readonly metadata: pulumi.Output<outputApi.meta.v1.ListMeta>;

/**
* Get the state of an existing `InitializerConfigurationList` resource, as identified by `id`.
* Get the state of an existing `LeaseList` resource, as identified by `id`.
* Typically this ID is of the form <namespace>/<name>; if <namespace> is omitted, then (per
* Kubernetes convention) the ID becomes default/<name>.
*
Expand All @@ -48,27 +48,27 @@ import * as outputApi from "../../types/output";
* <namespace>/<name> or <name>.
* @param opts Uniquely specifies a CustomResource to select.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): InitializerConfigurationList {
return new InitializerConfigurationList(name, undefined, { ...opts, id: id });
public static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): LeaseList {
return new LeaseList(name, undefined, { ...opts, id: id });
}

public getInputs(): inputApi.admissionregistration.v1alpha1.InitializerConfigurationList { return this.__inputs; }
private readonly __inputs: inputApi.admissionregistration.v1alpha1.InitializerConfigurationList;
public getInputs(): inputApi.coordination.v1.LeaseList { return this.__inputs; }
private readonly __inputs: inputApi.coordination.v1.LeaseList;

/**
* Create a admissionregistration.v1alpha1.InitializerConfigurationList resource with the given unique name, arguments, and options.
* Create a coordination.v1.LeaseList resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: inputApi.admissionregistration.v1alpha1.InitializerConfigurationList, opts?: pulumi.CustomResourceOptions) {
constructor(name: string, args?: inputApi.coordination.v1.LeaseList, opts?: pulumi.CustomResourceOptions) {
let inputs: pulumi.Inputs = {};
inputs["apiVersion"] = "admissionregistration.k8s.io/v1alpha1";
inputs["apiVersion"] = "coordination.k8s.io/v1";
inputs["items"] = args && args.items || undefined;
inputs["kind"] = "InitializerConfigurationList";
inputs["kind"] = "LeaseList";
inputs["metadata"] = args && args.metadata || undefined;
super("kubernetes:admissionregistration.k8s.io/v1alpha1:InitializerConfigurationList", name, inputs, opts);
super("kubernetes:coordination.k8s.io/v1:LeaseList", name, inputs, opts);
this.__inputs = <any>args;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// *** Do not edit by hand unless you're certain you know what you are doing! ***

// Export members:
export * from "./InitializerConfiguration";
export * from "./InitializerConfigurationList";
export * from "./Lease";
export * from "./LeaseList";

6 changes: 3 additions & 3 deletions sdk/nodejs/extensions/v1beta1/DaemonSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ import * as outputApi from "../../types/output";

/**
* Standard object's metadata. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*/
public readonly metadata: pulumi.Output<outputApi.meta.v1.ObjectMeta>;

/**
* The desired behavior of this daemon set. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
*/
public readonly spec: pulumi.Output<outputApi.extensions.v1beta1.DaemonSetSpec>;

/**
* The current status of this daemon set. This data may be out of date by some window of time.
* Populated by the system. Read-only. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
*/
public readonly status: pulumi.Output<outputApi.extensions.v1beta1.DaemonSetStatus>;

Expand Down
2 changes: 1 addition & 1 deletion sdk/nodejs/extensions/v1beta1/DaemonSetList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import * as outputApi from "../../types/output";

/**
* Standard list metadata. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*/
public readonly metadata: pulumi.Output<outputApi.meta.v1.ListMeta>;

Expand Down
Loading

0 comments on commit 92867d4

Please sign in to comment.