Skip to content

Commit

Permalink
Add support for k8s v1.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Aug 4, 2020
1 parent 4811a8d commit 2cafa9b
Show file tree
Hide file tree
Showing 307 changed files with 15,390 additions and 967 deletions.
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 cd scripts && ./get-py-version)
KUBE_VERSION ?= v1.18.0
KUBE_VERSION ?= v1.19.0-rc.4
SWAGGER_URL ?= https://github.com/kubernetes/kubernetes/raw/${KUBE_VERSION}/api/openapi-spec/swagger.json
OPENAPI_DIR := provider/pkg/gen/openapi-specs
OPENAPI_FILE := ${OPENAPI_DIR}/swagger-${KUBE_VERSION}.json
Expand Down
1,768 changes: 1,632 additions & 136 deletions provider/cmd/pulumi-resource-kubernetes/schema.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions provider/pkg/kinds/deprecated.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ import (
// https://git.k8s.io/kubernetes/CHANGELOG/CHANGELOG-1.14.md#deprecations
//
// admissionregistration/v1beta1/* / 1.16 / 1.19
// apiextensions/v1beta1/CustomResourceDefinition / 1.16 / 1.19
// apiextensions/v1beta1/CustomResourceDefinition / 1.16 / 1.22 (Previously 1.19)
// https://git.k8s.io/kubernetes/CHANGELOG/CHANGELOG-1.16.md#deprecations-and-removals
//
// rbac/v1alpha1/* / 1.17 / 1.22
// rbac/v1beta1/* / 1.17 / 1.22
// https://git.k8s.io/kubernetes/CHANGELOG/CHANGELOG-1.17.md#deprecations-and-removals
//
// apiextensions/v1beta1/* / 1.19 / _
// apiextensions/v1beta1/* / 1.19 / 1.22
// apiregistration/v1beta1/* / 1.19 / _
// authentication/v1beta1/* / 1.19 / 1.22
// authorization/v1beta1/* / 1.19 / 1.22
Expand Down Expand Up @@ -236,7 +236,7 @@ func RemovedInVersion(gvk schema.GroupVersionKind) *cluster.ServerVersion {
case AdmissionregistrationV1B1:
return &v119
case ApiextensionsV1B1:
return &v119
return &v122
case AuthenticationV1B1:
return &v122
case AuthorizationV1B1:
Expand Down
2 changes: 1 addition & 1 deletion provider/pkg/kinds/deprecated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func TestRemovedInVersion(t *testing.T) {
wantVersion *cluster.ServerVersion
}{
{toGVK(AdmissionregistrationV1B1, MutatingWebhookConfiguration), &v119},
{toGVK(ApiextensionsV1B1, CustomResourceDefinition), &v119},
{toGVK(ApiextensionsV1B1, CustomResourceDefinition), &v122},
{toGVK(AppsV1B1, Deployment), &v116},
{toGVK(AppsV1B2, Deployment), &v116},
{toGVK(AuthenticationV1B1, TokenReview), &v122},
Expand Down
2 changes: 2 additions & 0 deletions provider/pkg/kinds/kinds.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,13 @@ const (
BatchV1 groupVersion = "batch/v1"
BatchV1B1 groupVersion = "batch/v1beta1"
BatchV2A1 groupVersion = "batch/v2alpha1"
CertificatesV1 groupVersion = "certificates.k8s.io/v1"
CertificatesV1B1 groupVersion = "certificates.k8s.io/v1beta1"
CoordinationV1 groupVersion = "coordination.k8s.io/v1"
CoordinationV1B1 groupVersion = "coordination.k8s.io/v1beta1"
CoreV1 groupVersion = "core/v1"
DiscoveryV1B1 groupVersion = "discovery.k8s.io/v1beta1"
EventsV1 groupVersion = "events.k8s.io/v1"
EventsV1B1 groupVersion = "events.k8s.io/v1beta1"
ExtensionsV1B1 groupVersion = "extensions/v1beta1"
FlowcontrolV1A1 groupVersion = "flowcontrol.apiserver.k8s.io/v1alpha1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public InputList<string> ApiVersions
private InputList<string>? _operations;

/// <summary>
/// Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.
/// Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.
/// </summary>
public InputList<string> Operations
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public sealed class RuleWithOperations
/// </summary>
public readonly ImmutableArray<string> ApiVersions;
/// <summary>
/// Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.
/// Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.
/// </summary>
public readonly ImmutableArray<string> Operations;
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public InputList<string> ApiVersions
private InputList<string>? _operations;

/// <summary>
/// Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.
/// Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.
/// </summary>
public InputList<string> Operations
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public sealed class RuleWithOperations
/// </summary>
public readonly ImmutableArray<string> ApiVersions;
/// <summary>
/// Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.
/// Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.
/// </summary>
public readonly ImmutableArray<string> Operations;
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ public InputList<Pulumi.Kubernetes.Types.Inputs.ApiExtensions.V1.CustomResourceC
set => _additionalPrinterColumns = value;
}

/// <summary>
/// deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.
/// </summary>
[Input("deprecated")]
public Input<bool>? Deprecated { get; set; }

/// <summary>
/// deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.
/// </summary>
[Input("deprecationWarning")]
public Input<string>? DeprecationWarning { get; set; }

/// <summary>
/// name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis/&lt;group&gt;/&lt;version&gt;/...` if `served` is true.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ public sealed class CustomResourceDefinitionVersion
/// </summary>
public readonly ImmutableArray<Pulumi.Kubernetes.Types.Outputs.ApiExtensions.V1.CustomResourceColumnDefinition> AdditionalPrinterColumns;
/// <summary>
/// deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.
/// </summary>
public readonly bool Deprecated;
/// <summary>
/// deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.
/// </summary>
public readonly string DeprecationWarning;
/// <summary>
/// name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis/&lt;group&gt;/&lt;version&gt;/...` if `served` is true.
/// </summary>
public readonly string Name;
Expand All @@ -42,6 +50,10 @@ public sealed class CustomResourceDefinitionVersion
private CustomResourceDefinitionVersion(
ImmutableArray<Pulumi.Kubernetes.Types.Outputs.ApiExtensions.V1.CustomResourceColumnDefinition> additionalPrinterColumns,

bool deprecated,

string deprecationWarning,

string name,

Pulumi.Kubernetes.Types.Outputs.ApiExtensions.V1.CustomResourceValidation schema,
Expand All @@ -53,6 +65,8 @@ public sealed class CustomResourceDefinitionVersion
Pulumi.Kubernetes.Types.Outputs.ApiExtensions.V1.CustomResourceSubresources subresources)
{
AdditionalPrinterColumns = additionalPrinterColumns;
Deprecated = deprecated;
DeprecationWarning = deprecationWarning;
Name = name;
Schema = schema;
Served = served;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Pulumi.Kubernetes.ApiExtensions.V1Beta1
{
/// <summary>
/// CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format &lt;.spec.name&gt;.&lt;.spec.group&gt;. Deprecated in v1.16, planned for removal in v1.19. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead.
/// CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format &lt;.spec.name&gt;.&lt;.spec.group&gt;. Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead.
/// </summary>
public partial class CustomResourceDefinition : KubernetesResource
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ public InputList<Pulumi.Kubernetes.Types.Inputs.ApiExtensions.V1Beta1.CustomReso
set => _additionalPrinterColumns = value;
}

/// <summary>
/// deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.
/// </summary>
[Input("deprecated")]
public Input<bool>? Deprecated { get; set; }

/// <summary>
/// deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.
/// </summary>
[Input("deprecationWarning")]
public Input<string>? DeprecationWarning { get; set; }

/// <summary>
/// name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis/&lt;group&gt;/&lt;version&gt;/...` if `served` is true.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ public sealed class CustomResourceDefinitionVersion
/// </summary>
public readonly ImmutableArray<Pulumi.Kubernetes.Types.Outputs.ApiExtensions.V1Beta1.CustomResourceColumnDefinition> AdditionalPrinterColumns;
/// <summary>
/// deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.
/// </summary>
public readonly bool Deprecated;
/// <summary>
/// deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.
/// </summary>
public readonly string DeprecationWarning;
/// <summary>
/// name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis/&lt;group&gt;/&lt;version&gt;/...` if `served` is true.
/// </summary>
public readonly string Name;
Expand All @@ -42,6 +50,10 @@ public sealed class CustomResourceDefinitionVersion
private CustomResourceDefinitionVersion(
ImmutableArray<Pulumi.Kubernetes.Types.Outputs.ApiExtensions.V1Beta1.CustomResourceColumnDefinition> additionalPrinterColumns,

bool deprecated,

string deprecationWarning,

string name,

Pulumi.Kubernetes.Types.Outputs.ApiExtensions.V1Beta1.CustomResourceValidation schema,
Expand All @@ -53,6 +65,8 @@ public sealed class CustomResourceDefinitionVersion
Pulumi.Kubernetes.Types.Outputs.ApiExtensions.V1Beta1.CustomResourceSubresources subresources)
{
AdditionalPrinterColumns = additionalPrinterColumns;
Deprecated = deprecated;
DeprecationWarning = deprecationWarning;
Name = name;
Schema = schema;
Served = served;
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/ApiRegistration/V1/Inputs/APIServiceSpecArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class APIServiceSpecArgs : Pulumi.ResourceArgs
public Input<bool>? InsecureSkipTLSVerify { get; set; }

/// <summary>
/// Service is a reference to the service for this API server. It must communicate on port 443 If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.
/// Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.
/// </summary>
[Input("service")]
public Input<Pulumi.Kubernetes.Types.Inputs.ApiRegistration.V1.ServiceReferenceArgs>? Service { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/ApiRegistration/V1/Outputs/APIServiceSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public sealed class APIServiceSpec
/// </summary>
public readonly bool InsecureSkipTLSVerify;
/// <summary>
/// Service is a reference to the service for this API server. It must communicate on port 443 If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.
/// Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.
/// </summary>
public readonly Pulumi.Kubernetes.Types.Outputs.ApiRegistration.V1.ServiceReference Service;
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class APIServiceSpecArgs : Pulumi.ResourceArgs
public Input<bool>? InsecureSkipTLSVerify { get; set; }

/// <summary>
/// Service is a reference to the service for this API server. It must communicate on port 443 If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.
/// Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.
/// </summary>
[Input("service")]
public Input<Pulumi.Kubernetes.Types.Inputs.ApiRegistration.V1Beta1.ServiceReferenceArgs>? Service { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public sealed class APIServiceSpec
/// </summary>
public readonly bool InsecureSkipTLSVerify;
/// <summary>
/// Service is a reference to the service for this API server. It must communicate on port 443 If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.
/// Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.
/// </summary>
public readonly Pulumi.Kubernetes.Types.Outputs.ApiRegistration.V1Beta1.ServiceReference Service;
/// <summary>
Expand Down
Loading

0 comments on commit 2cafa9b

Please sign in to comment.