Skip to content

Commit

Permalink
Add support for k8s 1.17 (#706)
Browse files Browse the repository at this point in the history
Note: The discovery.v1alpha1.EndpointSlice and discovery.v1alpha1.EndpointSliceList APIs were removed in k8s 1.17, and no longer appear in the Pulumi Kubernetes SDKs. These resources can now be found at discovery.v1beta1.EndpointSlice and discovery.v1beta1.EndpointSliceList.
  • Loading branch information
lblackstone authored Dec 9, 2019
1 parent 0162c7f commit 826e6f4
Show file tree
Hide file tree
Showing 97 changed files with 6,972 additions and 911 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

### Supported Kubernetes versions

- v1.17.x
- v1.16.x
- v1.15.x
- v1.14.x

### Major changes

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

## 1.3.4 (December 5, 2019)

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,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.17.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
1 change: 1 addition & 0 deletions pkg/gen/dotnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ var pascalCaseMapping = map[string]string{
"discovery": "Discovery",
"events": "Events",
"extensions": "Extensions",
"flowcontrol": "FlowControl",
"networking": "Networking",
"meta": "Meta",
"node": "Node",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Kubernetes.Discovery.V1Alpha1
namespace Pulumi.Kubernetes.Discovery.V1Beta1
{
/// <summary>
/// EndpointSlice represents a subset of the endpoints that implement a service. For a given
Expand All @@ -16,7 +16,9 @@ public partial class EndpointSlice : Pulumi.CustomResource
{
/// <summary>
/// addressType specifies the type of address carried by this EndpointSlice. All addresses
/// in this slice must be the same type. Default is IP
/// in this slice must be the same type. This field is immutable after creation. The
/// following address types are currently supported: * IPv4: Represents an IPv4 Address. *
/// IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.
/// </summary>
[Output("addressType")]
public Output<string> AddressType { get; private set; } = null!;
Expand All @@ -35,7 +37,7 @@ public partial class EndpointSlice : Pulumi.CustomResource
/// of 1000 endpoints.
/// </summary>
[Output("endpoints")]
public Output<Types.Outputs.Discovery.V1Alpha1.Endpoint[]> Endpoints { get; private set; } = null!;
public Output<Types.Outputs.Discovery.V1Beta1.Endpoint[]> Endpoints { get; private set; } = null!;

/// <summary>
/// Kind is a string value representing the REST resource this object represents. Servers
Expand All @@ -59,7 +61,7 @@ public partial class EndpointSlice : Pulumi.CustomResource
/// Each slice may include a maximum of 100 ports.
/// </summary>
[Output("ports")]
public Output<Types.Outputs.Discovery.V1Alpha1.EndpointPort[]> Ports { get; private set; } = null!;
public Output<Types.Outputs.Discovery.V1Beta1.EndpointPort[]> Ports { get; private set; } = null!;


/// <summary>
Expand All @@ -68,15 +70,15 @@ public partial class EndpointSlice : Pulumi.CustomResource
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public EndpointSlice(string name, Types.Inputs.Discovery.V1Alpha1.EndpointSliceArgs? args = null, CustomResourceOptions? options = null)
: base("kubernetes:discovery.k8s.io/v1alpha1:EndpointSlice", name, SetAPIKindAndVersion(args), MakeResourceOptions(options))
public EndpointSlice(string name, Types.Inputs.Discovery.V1Beta1.EndpointSliceArgs? args = null, CustomResourceOptions? options = null)
: base("kubernetes:discovery.k8s.io/v1beta1:EndpointSlice", name, SetAPIKindAndVersion(args), MakeResourceOptions(options))
{
}

private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Discovery.V1Alpha1.EndpointSliceArgs? args)
private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Discovery.V1Beta1.EndpointSliceArgs? args)
{
if (args != null) {
args.ApiVersion = "discovery.k8s.io/v1alpha1";
args.ApiVersion = "discovery.k8s.io/v1beta1";
args.Kind = "EndpointSlice";
}
return args ?? ResourceArgs.Empty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Kubernetes.Discovery.V1Alpha1
namespace Pulumi.Kubernetes.Discovery.V1Beta1
{
/// <summary>
/// EndpointSliceList represents a list of endpoint slices
Expand All @@ -25,7 +25,7 @@ public partial class EndpointSliceList : Pulumi.CustomResource
/// List of endpoint slices
/// </summary>
[Output("items")]
public Output<Types.Outputs.Discovery.V1Alpha1.EndpointSlice[]> Items { get; private set; } = null!;
public Output<Types.Outputs.Discovery.V1Beta1.EndpointSlice[]> Items { get; private set; } = null!;

/// <summary>
/// Kind is a string value representing the REST resource this object represents. Servers
Expand All @@ -49,15 +49,15 @@ public partial class EndpointSliceList : Pulumi.CustomResource
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public EndpointSliceList(string name, Types.Inputs.Discovery.V1Alpha1.EndpointSliceListArgs? args = null, CustomResourceOptions? options = null)
: base("kubernetes:discovery.k8s.io/v1alpha1:EndpointSliceList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options))
public EndpointSliceList(string name, Types.Inputs.Discovery.V1Beta1.EndpointSliceListArgs? args = null, CustomResourceOptions? options = null)
: base("kubernetes:discovery.k8s.io/v1beta1:EndpointSliceList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options))
{
}

private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Discovery.V1Alpha1.EndpointSliceListArgs? args)
private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Discovery.V1Beta1.EndpointSliceListArgs? args)
{
if (args != null) {
args.ApiVersion = "discovery.k8s.io/v1alpha1";
args.ApiVersion = "discovery.k8s.io/v1beta1";
args.Kind = "EndpointSliceList";
}
return args ?? ResourceArgs.Empty;
Expand Down
101 changes: 101 additions & 0 deletions sdk/dotnet/FlowControl/V1Alpha1/FlowSchema.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// *** 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! ***

using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Kubernetes.FlowControl.V1Alpha1
{
/// <summary>
/// FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of
/// inbound API requests with similar attributes and is identified by a pair of strings: the
/// name of the FlowSchema and a "flow distinguisher".
/// </summary>
public partial class FlowSchema : Pulumi.CustomResource
{
/// <summary>
/// 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
/// </summary>
[Output("apiVersion")]
public Output<string> ApiVersion { get; private set; } = null!;

/// <summary>
/// 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
/// </summary>
[Output("kind")]
public Output<string> Kind { get; private set; } = null!;

/// <summary>
/// `metadata` is the standard object's metadata. More info:
/// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
/// </summary>
[Output("metadata")]
public Output<Types.Outputs.Meta.V1.ObjectMeta> Metadata { get; private set; } = null!;

/// <summary>
/// `spec` is the specification of the desired behavior of a FlowSchema. More info:
/// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
/// </summary>
[Output("spec")]
public Output<Types.Outputs.FlowControl.V1Alpha1.FlowSchemaSpec> Spec { get; private set; } = null!;

/// <summary>
/// `status` is the current status of a FlowSchema. More info:
/// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
/// </summary>
[Output("status")]
public Output<Types.Outputs.FlowControl.V1Alpha1.FlowSchemaStatus> Status { get; private set; } = null!;


/// <summary>
/// Create a FlowSchema resource with the given unique name, arguments, and options.
/// </summary>
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public FlowSchema(string name, Types.Inputs.FlowControl.V1Alpha1.FlowSchemaArgs? args = null, CustomResourceOptions? options = null)
: base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:FlowSchema", name, SetAPIKindAndVersion(args), MakeResourceOptions(options))
{
}

private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.FlowControl.V1Alpha1.FlowSchemaArgs? args)
{
if (args != null) {
args.ApiVersion = "flowcontrol.apiserver.k8s.io/v1alpha1";
args.Kind = "FlowSchema";
}
return args ?? ResourceArgs.Empty;
}

private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
};
return CustomResourceOptions.Merge(defaultOptions, options);
}

/// <summary>
/// Get an existing FlowSchema resource's state with the given name and ID.
/// </summary>
/// <param name="name">The unique name of the resulting resource.</param>
/// <param name="id">The unique provider ID of the resource to lookup.</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public static FlowSchema Get(string name, Input<string> id, CustomResourceOptions? options = null)
{
return new FlowSchema(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions
{
Id = id,
}));
}

}
}
91 changes: 91 additions & 0 deletions sdk/dotnet/FlowControl/V1Alpha1/FlowSchemaList.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
// *** 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! ***

using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Kubernetes.FlowControl.V1Alpha1
{
/// <summary>
/// FlowSchemaList is a list of FlowSchema objects.
/// </summary>
public partial class FlowSchemaList : Pulumi.CustomResource
{
/// <summary>
/// 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
/// </summary>
[Output("apiVersion")]
public Output<string> ApiVersion { get; private set; } = null!;

/// <summary>
/// `items` is a list of FlowSchemas.
/// </summary>
[Output("items")]
public Output<Types.Outputs.FlowControl.V1Alpha1.FlowSchema[]> Items { get; private set; } = null!;

/// <summary>
/// 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
/// </summary>
[Output("kind")]
public Output<string> Kind { get; private set; } = null!;

/// <summary>
/// `metadata` is the standard list metadata. More info:
/// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
/// </summary>
[Output("metadata")]
public Output<Types.Outputs.Meta.V1.ListMeta> Metadata { get; private set; } = null!;


/// <summary>
/// Create a FlowSchemaList resource with the given unique name, arguments, and options.
/// </summary>
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public FlowSchemaList(string name, Types.Inputs.FlowControl.V1Alpha1.FlowSchemaListArgs? args = null, CustomResourceOptions? options = null)
: base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:FlowSchemaList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options))
{
}

private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.FlowControl.V1Alpha1.FlowSchemaListArgs? args)
{
if (args != null) {
args.ApiVersion = "flowcontrol.apiserver.k8s.io/v1alpha1";
args.Kind = "FlowSchemaList";
}
return args ?? ResourceArgs.Empty;
}

private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
};
return CustomResourceOptions.Merge(defaultOptions, options);
}

/// <summary>
/// Get an existing FlowSchemaList resource's state with the given name and ID.
/// </summary>
/// <param name="name">The unique name of the resulting resource.</param>
/// <param name="id">The unique provider ID of the resource to lookup.</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public static FlowSchemaList Get(string name, Input<string> id, CustomResourceOptions? options = null)
{
return new FlowSchemaList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions
{
Id = id,
}));
}

}
}
Loading

0 comments on commit 826e6f4

Please sign in to comment.