Skip to content

Commit

Permalink
Add support for k8s 1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Aug 30, 2019
1 parent 8912a60 commit 825b978
Show file tree
Hide file tree
Showing 24 changed files with 3,659 additions and 371 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.15.0
KUBE_VERSION ?= v1.17.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
3 changes: 2 additions & 1 deletion sdk/nodejs/admissionregistration/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
@@ -0,0 +1,98 @@
// *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

import * as pulumi from "@pulumi/pulumi";
import { core } from "../..";
import * as inputs from "../../types/input";
import * as outputs from "../../types/output";
import { getVersion } from "../../version";

/**
* MutatingWebhookConfiguration describes the configuration of and admission webhook that accept
* or reject and may change the object.
*/
export class MutatingWebhookConfiguration 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/sig-architecture/api-conventions.md#resources
*/
public readonly apiVersion: pulumi.Output<"admissionregistration.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/sig-architecture/api-conventions.md#types-kinds
*/
public readonly kind: pulumi.Output<"MutatingWebhookConfiguration">;

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

/**
* Webhooks is a list of webhooks and the affected resources and operations.
*/
public readonly webhooks: pulumi.Output<outputs.admissionregistration.v1.MutatingWebhook[]>;

/**
* Get the state of an existing `MutatingWebhookConfiguration` resource, as identified by `id`.
* The ID is of the form `[namespace]/<name>`; if `namespace` is omitted, then (per
* Kubernetes convention) the ID becomes `default/<name>`.
*
* Pulumi will keep track of this resource using `name` as the Pulumi ID.
*
* @param name _Unique_ name used to register this resource with Pulumi.
* @param id An ID for the Kubernetes resource to retrieve. Takes the form `[namespace]/<name>`.
* @param opts Uniquely specifies a CustomResource to select.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): MutatingWebhookConfiguration {
return new MutatingWebhookConfiguration(name, undefined, { ...opts, id: id });
}

/** @internal */
private static readonly __pulumiType = "kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfiguration";

/**
* Returns true if the given object is an instance of MutatingWebhookConfiguration. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is MutatingWebhookConfiguration {
if (obj === undefined || obj === null) {
return false;
}

return obj["__pulumiType"] === MutatingWebhookConfiguration.__pulumiType;
}

/**
* Create a admissionregistration.v1.MutatingWebhookConfiguration 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?: inputs.admissionregistration.v1.MutatingWebhookConfiguration, opts?: pulumi.CustomResourceOptions) {
const props: pulumi.Inputs = {};

props["apiVersion"] = "admissionregistration.k8s.io/v1";
props["kind"] = "MutatingWebhookConfiguration";
props["metadata"] = args && args.metadata || undefined;
props["webhooks"] = args && args.webhooks || undefined;

props["status"] = undefined;

if (!opts) {
opts = {};
}

if (!opts.version) {
opts.version = getVersion();
}
super(MutatingWebhookConfiguration.__pulumiType, name, props, opts);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

import * as pulumi from "@pulumi/pulumi";
import { core } from "../..";
import * as inputs from "../../types/input";
import * as outputs from "../../types/output";
import { getVersion } from "../../version";

/**
* MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
*/
export class MutatingWebhookConfigurationList 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/sig-architecture/api-conventions.md#resources
*/
public readonly apiVersion: pulumi.Output<"admissionregistration.k8s.io/v1">;

/**
* List of MutatingWebhookConfiguration.
*/
public readonly items: pulumi.Output<outputs.admissionregistration.v1.MutatingWebhookConfiguration[]>;

/**
* 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
*/
public readonly kind: pulumi.Output<"MutatingWebhookConfigurationList">;

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

/**
* Get the state of an existing `MutatingWebhookConfigurationList` resource, as identified by `id`.
* The ID is of the form `[namespace]/<name>`; if `namespace` is omitted, then (per
* Kubernetes convention) the ID becomes `default/<name>`.
*
* Pulumi will keep track of this resource using `name` as the Pulumi ID.
*
* @param name _Unique_ name used to register this resource with Pulumi.
* @param id An ID for the Kubernetes resource to retrieve. Takes the form `[namespace]/<name>`.
* @param opts Uniquely specifies a CustomResource to select.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): MutatingWebhookConfigurationList {
return new MutatingWebhookConfigurationList(name, undefined, { ...opts, id: id });
}

/** @internal */
private static readonly __pulumiType = "kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfigurationList";

/**
* Returns true if the given object is an instance of MutatingWebhookConfigurationList. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is MutatingWebhookConfigurationList {
if (obj === undefined || obj === null) {
return false;
}

return obj["__pulumiType"] === MutatingWebhookConfigurationList.__pulumiType;
}

/**
* Create a admissionregistration.v1.MutatingWebhookConfigurationList 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?: inputs.admissionregistration.v1.MutatingWebhookConfigurationList, opts?: pulumi.CustomResourceOptions) {
const props: pulumi.Inputs = {};
props["items"] = args && args.items || undefined;

props["apiVersion"] = "admissionregistration.k8s.io/v1";
props["kind"] = "MutatingWebhookConfigurationList";
props["metadata"] = args && args.metadata || undefined;

props["status"] = undefined;

if (!opts) {
opts = {};
}

if (!opts.version) {
opts.version = getVersion();
}
super(MutatingWebhookConfigurationList.__pulumiType, name, props, opts);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

import * as pulumi from "@pulumi/pulumi";
import { core } from "../..";
import * as inputs from "../../types/input";
import * as outputs from "../../types/output";
import { getVersion } from "../../version";

/**
* ValidatingWebhookConfiguration describes the configuration of and admission webhook that
* accept or reject and object without changing it.
*/
export class ValidatingWebhookConfiguration 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/sig-architecture/api-conventions.md#resources
*/
public readonly apiVersion: pulumi.Output<"admissionregistration.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/sig-architecture/api-conventions.md#types-kinds
*/
public readonly kind: pulumi.Output<"ValidatingWebhookConfiguration">;

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

/**
* Webhooks is a list of webhooks and the affected resources and operations.
*/
public readonly webhooks: pulumi.Output<outputs.admissionregistration.v1.ValidatingWebhook[]>;

/**
* Get the state of an existing `ValidatingWebhookConfiguration` resource, as identified by `id`.
* The ID is of the form `[namespace]/<name>`; if `namespace` is omitted, then (per
* Kubernetes convention) the ID becomes `default/<name>`.
*
* Pulumi will keep track of this resource using `name` as the Pulumi ID.
*
* @param name _Unique_ name used to register this resource with Pulumi.
* @param id An ID for the Kubernetes resource to retrieve. Takes the form `[namespace]/<name>`.
* @param opts Uniquely specifies a CustomResource to select.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): ValidatingWebhookConfiguration {
return new ValidatingWebhookConfiguration(name, undefined, { ...opts, id: id });
}

/** @internal */
private static readonly __pulumiType = "kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfiguration";

/**
* Returns true if the given object is an instance of ValidatingWebhookConfiguration. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is ValidatingWebhookConfiguration {
if (obj === undefined || obj === null) {
return false;
}

return obj["__pulumiType"] === ValidatingWebhookConfiguration.__pulumiType;
}

/**
* Create a admissionregistration.v1.ValidatingWebhookConfiguration 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?: inputs.admissionregistration.v1.ValidatingWebhookConfiguration, opts?: pulumi.CustomResourceOptions) {
const props: pulumi.Inputs = {};

props["apiVersion"] = "admissionregistration.k8s.io/v1";
props["kind"] = "ValidatingWebhookConfiguration";
props["metadata"] = args && args.metadata || undefined;
props["webhooks"] = args && args.webhooks || undefined;

props["status"] = undefined;

if (!opts) {
opts = {};
}

if (!opts.version) {
opts.version = getVersion();
}
super(ValidatingWebhookConfiguration.__pulumiType, name, props, opts);
}
}
Loading

0 comments on commit 825b978

Please sign in to comment.