Skip to content

Commit

Permalink
Add support for k8s 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Sep 22, 2020
1 parent b8315e5 commit ef75ea4
Show file tree
Hide file tree
Showing 45 changed files with 128 additions and 125 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.19.0
KUBE_VERSION ?= v1.20.0-alpha.1
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
22 changes: 11 additions & 11 deletions provider/cmd/pulumi-resource-kubernetes/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8367,7 +8367,7 @@
},
"type": {
"type": "string",
"description": "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object."
"description": "type is the type of metric source. It should be one of \"Object\", \"Pods\", \"Resource\" or \"External\", each mapping to a matching field in the object."
}
},
"type": "object",
Expand Down Expand Up @@ -9063,7 +9063,7 @@
},
"type": {
"type": "string",
"description": "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object."
"description": "type is the type of metric source. It should be one of \"Object\", \"Pods\", \"Resource\" or \"External\", each mapping to a matching field in the object."
}
},
"type": "object",
Expand Down Expand Up @@ -9539,14 +9539,14 @@
},
"completionTime": {
"type": "string",
"description": "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC."
"description": "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully."
},
"conditions": {
"type": "array",
"items": {
"$ref": "#/types/kubernetes:batch/v1:JobCondition"
},
"description": "The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/"
"description": "The latest available observations of an object's current state. When a job fails, one of the conditions will have type == \"Failed\". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/"
},
"failed": {
"type": "integer",
Expand Down Expand Up @@ -11556,7 +11556,7 @@
},
"startupProbe": {
"$ref": "#/types/kubernetes:core/v1:Probe",
"description": "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is a beta feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"
"description": "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"
},
"stdin": {
"type": "boolean",
Expand Down Expand Up @@ -17218,7 +17218,7 @@
},
"externalName": {
"type": "string",
"description": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName."
"description": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName."
},
"externalTrafficPolicy": {
"type": "string",
Expand Down Expand Up @@ -18050,7 +18050,7 @@
},
"hostname": {
"type": "string",
"description": "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation."
"description": "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation."
},
"targetRef": {
"$ref": "#/types/kubernetes:core/v1:ObjectReference",
Expand Down Expand Up @@ -23154,7 +23154,7 @@
},
"runtimeHandler": {
"type": "string",
"description": "RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must conform to the DNS Label (RFC 1123) requirements and is immutable."
"description": "RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable."
},
"scheduling": {
"$ref": "#/types/kubernetes:node.k8s.io/v1alpha1:Scheduling",
Expand Down Expand Up @@ -23233,7 +23233,7 @@
},
"handler": {
"type": "string",
"description": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must conform to the DNS Label (RFC 1123) requirements, and is immutable."
"description": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable."
},
"kind": {
"type": "string",
Expand Down Expand Up @@ -35513,7 +35513,7 @@
},
"handler": {
"type": "string",
"description": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must conform to the DNS Label (RFC 1123) requirements, and is immutable."
"description": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable."
},
"kind": {
"type": "string",
Expand Down Expand Up @@ -35545,7 +35545,7 @@
},
"handler": {
"type": "string",
"description": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must conform to the DNS Label (RFC 1123) requirements, and is immutable."
"description": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable."
},
"kind": {
"type": "string",
Expand Down
3 changes: 3 additions & 0 deletions provider/pkg/gen/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ func PulumiSchema(swagger map[string]interface{}) pschema.PackageSpec {
definitions := swagger["definitions"].(map[string]interface{})
groupsSlice := createGroups(definitions)
for _, group := range groupsSlice {
if group.Group() == "apiserverinternal" {
continue
}
for _, version := range group.Versions() {
for _, kind := range version.Kinds() {
tok := fmt.Sprintf(`kubernetes:%s:%s`, kind.apiVersion, kind.kind)
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Autoscaling/V2Beta1/Inputs/MetricSpecArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class MetricSpecArgs : Pulumi.ResourceArgs
public Input<Pulumi.Kubernetes.Types.Inputs.Autoscaling.V2Beta1.ResourceMetricSourceArgs>? Resource { get; set; }

/// <summary>
/// type is the type of metric source. It should be one of "Object", "Pods" or "Resource", each mapping to a matching field in the object.
/// type is the type of metric source. It should be one of "Object", "Pods", "Resource" or "External", each mapping to a matching field in the object.
/// </summary>
[Input("type", required: true)]
public Input<string> Type { get; set; } = null!;
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Autoscaling/V2Beta1/Outputs/MetricSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public sealed class MetricSpec
/// </summary>
public readonly Pulumi.Kubernetes.Types.Outputs.Autoscaling.V2Beta1.ResourceMetricSource Resource;
/// <summary>
/// type is the type of metric source. It should be one of "Object", "Pods" or "Resource", each mapping to a matching field in the object.
/// type is the type of metric source. It should be one of "Object", "Pods", "Resource" or "External", each mapping to a matching field in the object.
/// </summary>
public readonly string Type;

Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Autoscaling/V2Beta2/Inputs/MetricSpecArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class MetricSpecArgs : Pulumi.ResourceArgs
public Input<Pulumi.Kubernetes.Types.Inputs.Autoscaling.V2Beta2.ResourceMetricSourceArgs>? Resource { get; set; }

/// <summary>
/// type is the type of metric source. It should be one of "Object", "Pods" or "Resource", each mapping to a matching field in the object.
/// type is the type of metric source. It should be one of "Object", "Pods", "Resource" or "External", each mapping to a matching field in the object.
/// </summary>
[Input("type", required: true)]
public Input<string> Type { get; set; } = null!;
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Autoscaling/V2Beta2/Outputs/MetricSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public sealed class MetricSpec
/// </summary>
public readonly Pulumi.Kubernetes.Types.Outputs.Autoscaling.V2Beta2.ResourceMetricSource Resource;
/// <summary>
/// type is the type of metric source. It should be one of "Object", "Pods" or "Resource", each mapping to a matching field in the object.
/// type is the type of metric source. It should be one of "Object", "Pods", "Resource" or "External", each mapping to a matching field in the object.
/// </summary>
public readonly string Type;

Expand Down
4 changes: 2 additions & 2 deletions sdk/dotnet/Batch/V1/Inputs/JobStatusArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class JobStatusArgs : Pulumi.ResourceArgs
public Input<int>? Active { get; set; }

/// <summary>
/// Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.
/// Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully.
/// </summary>
[Input("completionTime")]
public Input<string>? CompletionTime { get; set; }
Expand All @@ -31,7 +31,7 @@ public class JobStatusArgs : Pulumi.ResourceArgs
private InputList<Pulumi.Kubernetes.Types.Inputs.Batch.V1.JobConditionArgs>? _conditions;

/// <summary>
/// The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
/// The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
/// </summary>
public InputList<Pulumi.Kubernetes.Types.Inputs.Batch.V1.JobConditionArgs> Conditions
{
Expand Down
4 changes: 2 additions & 2 deletions sdk/dotnet/Batch/V1/Outputs/JobStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public sealed class JobStatus
/// </summary>
public readonly int Active;
/// <summary>
/// Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.
/// Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully.
/// </summary>
public readonly string CompletionTime;
/// <summary>
/// The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
/// The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
/// </summary>
public readonly ImmutableArray<Pulumi.Kubernetes.Types.Outputs.Batch.V1.JobCondition> Conditions;
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Core/V1/Inputs/ContainerArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public InputList<Pulumi.Kubernetes.Types.Inputs.Core.V1.ContainerPortArgs> Ports
public Input<Pulumi.Kubernetes.Types.Inputs.Core.V1.SecurityContextArgs>? SecurityContext { get; set; }

/// <summary>
/// StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is a beta feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
/// StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
/// </summary>
[Input("startupProbe")]
public Input<Pulumi.Kubernetes.Types.Inputs.Core.V1.ProbeArgs>? StartupProbe { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Core/V1/Inputs/ServiceSpecArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public InputList<string> ExternalIPs
}

/// <summary>
/// externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName.
/// externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName.
/// </summary>
[Input("externalName")]
public Input<string>? ExternalName { get; set; }
Expand Down
Loading

0 comments on commit ef75ea4

Please sign in to comment.