Skip to content

Commit

Permalink
Add support for Kubernetes v1.23.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Dec 1, 2021
1 parent b33dc62 commit 2a287d4
Show file tree
Hide file tree
Showing 377 changed files with 40,507 additions and 10,935 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ VERSION ?= $(shell pulumictl get version)
PROVIDER_PATH := provider/v3
VERSION_PATH := ${PROVIDER_PATH}/pkg/version.Version

KUBE_VERSION ?= v1.22.0
KUBE_VERSION ?= v1.23.0-rc.0
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
16,612 changes: 9,335 additions & 7,277 deletions provider/cmd/pulumi-resource-kubernetes/schema.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions provider/pkg/kinds/kinds.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ const (
AuthorizationV1 groupVersion = "authorization.k8s.io/v1"
AuthorizationV1B1 groupVersion = "authorization.k8s.io/v1beta1"
AutoscalingV1 groupVersion = "autoscaling/v1"
AutoscalingV2 groupVersion = "autoscaling/v2"
AutoscalingV2B1 groupVersion = "autoscaling/v2beta1"
AutoscalingV2B2 groupVersion = "autoscaling/v2beta2"
BatchV1 groupVersion = "batch/v1"
Expand All @@ -239,6 +240,7 @@ const (
ExtensionsV1B1 groupVersion = "extensions/v1beta1"
FlowcontrolV1A1 groupVersion = "flowcontrol.apiserver.k8s.io/v1alpha1"
FlowcontrolV1B1 groupVersion = "flowcontrol.apiserver.k8s.io/v1beta1"
FlowcontrolV1B2 groupVersion = "flowcontrol.apiserver.k8s.io/v1beta2"
MetaV1 groupVersion = "meta/v1"
NetworkingV1 groupVersion = "networking.k8s.io/v1"
NetworkingV1B1 groupVersion = "networking.k8s.io/v1beta1"
Expand Down Expand Up @@ -288,6 +290,7 @@ var KnownGroupVersions = codegen.NewStringSet(
"authorization.k8s.io/v1",
"authorization.k8s.io/v1beta1",
"autoscaling/v1",
"autoscaling/v2",
"autoscaling/v2beta1",
"autoscaling/v2beta2",
"batch/v1",
Expand All @@ -305,6 +308,7 @@ var KnownGroupVersions = codegen.NewStringSet(
"extensions/v1beta1",
"flowcontrol.apiserver.k8s.io/v1alpha1",
"flowcontrol.apiserver.k8s.io/v1beta1",
"flowcontrol.apiserver.k8s.io/v1beta2",
"meta/v1",
"networking.k8s.io/v1",
"networking.k8s.io/v1beta1",
Expand Down
12 changes: 12 additions & 0 deletions sdk/dotnet/ApiExtensions/V1/Inputs/JSONSchemaPropsArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,18 @@ public InputList<string> X_kubernetes_list_map_keys
[Input("x_kubernetes_preserve_unknown_fields")]
public Input<bool>? X_kubernetes_preserve_unknown_fields { get; set; }

[Input("x_kubernetes_validations")]
private InputList<Pulumi.Kubernetes.Types.Inputs.ApiExtensions.V1.ValidationRuleArgs>? _x_kubernetes_validations;

/// <summary>
/// x-kubernetes-validations describes a list of validation rules written in the CEL expression language. This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.
/// </summary>
public InputList<Pulumi.Kubernetes.Types.Inputs.ApiExtensions.V1.ValidationRuleArgs> X_kubernetes_validations
{
get => _x_kubernetes_validations ?? (_x_kubernetes_validations = new InputList<Pulumi.Kubernetes.Types.Inputs.ApiExtensions.V1.ValidationRuleArgs>());
set => _x_kubernetes_validations = value;
}

public JSONSchemaPropsArgs()
{
}
Expand Down
58 changes: 58 additions & 0 deletions sdk/dotnet/ApiExtensions/V1/Inputs/ValidationRuleArgs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// *** WARNING: this file was generated by pulumigen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

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

namespace Pulumi.Kubernetes.Types.Inputs.ApiExtensions.V1
{

/// <summary>
/// ValidationRule describes a validation rule written in the CEL expression language.
/// </summary>
public class ValidationRuleArgs : Pulumi.ResourceArgs
{
/// <summary>
/// Message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is "failed rule: {Rule}". e.g. "must be a URL with the host matching spec.host"
/// </summary>
[Input("message")]
public Input<string>? Message { get; set; }

/// <summary>
/// Rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The `self` variable in the CEL expression is bound to the scoped value. Example: - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual &lt;= self.spec.maxDesired"}
///
/// If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as absent fields in CEL expressions. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map are accessible via CEL macros and functions such as `self.all(...)`. If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and functions. If the Rule is scoped to a scalar, `self` is bound to the scalar value. Examples: - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority &lt; 10"} - Rule scoped to a list of integers: {"rule": "self.values.all(value, value &gt;= 0 &amp;&amp; value &lt; 100)"} - Rule scoped to a string value: {"rule": "self.startsWith('kube')"}
///
/// The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible.
///
/// Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as:
/// - A schema with no type and x-kubernetes-preserve-unknown-fields set to true
/// - An array where the items schema is of an "unknown type"
/// - An object where the additionalProperties schema is of an "unknown type"
///
/// Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:
/// "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if",
/// "import", "let", "loop", "package", "namespace", "return".
/// Examples:
/// - Rule accessing a property named "namespace": {"rule": "self.__namespace__ &gt; 0"}
/// - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop &gt; 0"}
/// - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d &gt; 0"}
///
/// Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:
/// - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and
/// non-intersecting elements in `Y` are appended, retaining their partial order.
/// - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values
/// are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with
/// non-intersecting keys are appended, retaining their partial order.
/// </summary>
[Input("rule", required: true)]
public Input<string> Rule { get; set; } = null!;

public ValidationRuleArgs()
{
}
}
}
9 changes: 8 additions & 1 deletion sdk/dotnet/ApiExtensions/V1/Outputs/JSONSchemaProps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ public sealed class JSONSchemaProps
/// x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.
/// </summary>
public readonly bool X_kubernetes_preserve_unknown_fields;
/// <summary>
/// x-kubernetes-validations describes a list of validation rules written in the CEL expression language. This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.
/// </summary>
public readonly ImmutableArray<Pulumi.Kubernetes.Types.Outputs.ApiExtensions.V1.ValidationRule> X_kubernetes_validations;

[OutputConstructor]
private JSONSchemaProps(
Expand Down Expand Up @@ -205,7 +209,9 @@ private JSONSchemaProps(

string x_kubernetes_map_type,

bool x_kubernetes_preserve_unknown_fields)
bool x_kubernetes_preserve_unknown_fields,

ImmutableArray<Pulumi.Kubernetes.Types.Outputs.ApiExtensions.V1.ValidationRule> x_kubernetes_validations)
{
Ref = @ref;
Schema = schema;
Expand Down Expand Up @@ -250,6 +256,7 @@ private JSONSchemaProps(
X_kubernetes_list_type = x_kubernetes_list_type;
X_kubernetes_map_type = x_kubernetes_map_type;
X_kubernetes_preserve_unknown_fields = x_kubernetes_preserve_unknown_fields;
X_kubernetes_validations = x_kubernetes_validations;
}
}
}
62 changes: 62 additions & 0 deletions sdk/dotnet/ApiExtensions/V1/Outputs/ValidationRule.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// *** WARNING: this file was generated by pulumigen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

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

namespace Pulumi.Kubernetes.Types.Outputs.ApiExtensions.V1
{

/// <summary>
/// ValidationRule describes a validation rule written in the CEL expression language.
/// </summary>
[OutputType]
public sealed class ValidationRule
{
/// <summary>
/// Message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is "failed rule: {Rule}". e.g. "must be a URL with the host matching spec.host"
/// </summary>
public readonly string Message;
/// <summary>
/// Rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The `self` variable in the CEL expression is bound to the scoped value. Example: - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual &lt;= self.spec.maxDesired"}
///
/// If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as absent fields in CEL expressions. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map are accessible via CEL macros and functions such as `self.all(...)`. If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and functions. If the Rule is scoped to a scalar, `self` is bound to the scalar value. Examples: - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority &lt; 10"} - Rule scoped to a list of integers: {"rule": "self.values.all(value, value &gt;= 0 &amp;&amp; value &lt; 100)"} - Rule scoped to a string value: {"rule": "self.startsWith('kube')"}
///
/// The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible.
///
/// Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as:
/// - A schema with no type and x-kubernetes-preserve-unknown-fields set to true
/// - An array where the items schema is of an "unknown type"
/// - An object where the additionalProperties schema is of an "unknown type"
///
/// Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:
/// "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if",
/// "import", "let", "loop", "package", "namespace", "return".
/// Examples:
/// - Rule accessing a property named "namespace": {"rule": "self.__namespace__ &gt; 0"}
/// - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop &gt; 0"}
/// - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d &gt; 0"}
///
/// Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:
/// - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and
/// non-intersecting elements in `Y` are appended, retaining their partial order.
/// - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values
/// are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with
/// non-intersecting keys are appended, retaining their partial order.
/// </summary>
public readonly string Rule;

[OutputConstructor]
private ValidationRule(
string message,

string rule)
{
Message = message;
Rule = rule;
}
}
}
2 changes: 1 addition & 1 deletion sdk/dotnet/Apps/V1/Inputs/DaemonSetStatusArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public InputList<Pulumi.Kubernetes.Types.Inputs.Apps.V1.DaemonSetConditionArgs>
public Input<int> NumberMisscheduled { get; set; } = null!;

/// <summary>
/// The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.
/// numberReady is the number of nodes that should be running the daemon pod and have one or more of the daemon pod running with a Ready Condition.
/// </summary>
[Input("numberReady", required: true)]
public Input<int> NumberReady { get; set; } = null!;
Expand Down
4 changes: 4 additions & 0 deletions sdk/dotnet/Apps/V1/Inputs/DaemonSetUpdateStrategyArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public class DaemonSetUpdateStrategyArgs : Pulumi.ResourceArgs

/// <summary>
/// Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.
///
/// Possible enum values:
/// - `"OnDelete"` Replace the old daemons only when it's killed
/// - `"RollingUpdate"` Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.
/// </summary>
[Input("type")]
public Input<string>? Type { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Apps/V1/Inputs/DeploymentStatusArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public InputList<Pulumi.Kubernetes.Types.Inputs.Apps.V1.DeploymentConditionArgs>
public Input<int>? ObservedGeneration { get; set; }

/// <summary>
/// Total number of ready pods targeted by this deployment.
/// readyReplicas is the number of pods targeted by this Deployment with a Ready Condition.
/// </summary>
[Input("readyReplicas")]
public Input<int>? ReadyReplicas { get; set; }
Expand Down
4 changes: 4 additions & 0 deletions sdk/dotnet/Apps/V1/Inputs/DeploymentStrategyArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public class DeploymentStrategyArgs : Pulumi.ResourceArgs

/// <summary>
/// Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
///
/// Possible enum values:
/// - `"Recreate"` Kill all existing pods before creating new ones.
/// - `"RollingUpdate"` Replace the old ReplicaSets by new one using rolling update i.e gradually scale down the old ReplicaSets and scale up the new one.
/// </summary>
[Input("type")]
public Input<string>? Type { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Apps/V1/Inputs/ReplicaSetStatusArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public InputList<Pulumi.Kubernetes.Types.Inputs.Apps.V1.ReplicaSetConditionArgs>
public Input<int>? ObservedGeneration { get; set; }

/// <summary>
/// The number of ready replicas for this replica set.
/// readyReplicas is the number of pods targeted by this ReplicaSet with a Ready Condition.
/// </summary>
[Input("readyReplicas")]
public Input<int>? ReadyReplicas { get; set; }
Expand Down
10 changes: 10 additions & 0 deletions sdk/dotnet/Apps/V1/Inputs/StatefulSetSpecArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,18 @@ public class StatefulSetSpecArgs : Pulumi.ResourceArgs
[Input("minReadySeconds")]
public Input<int>? MinReadySeconds { get; set; }

/// <summary>
/// persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha. +optional
/// </summary>
[Input("persistentVolumeClaimRetentionPolicy")]
public Input<Pulumi.Kubernetes.Types.Inputs.Apps.V1.StatefulSetPersistentVolumeClaimRetentionPolicyArgs>? PersistentVolumeClaimRetentionPolicy { get; set; }

/// <summary>
/// podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.
///
/// Possible enum values:
/// - `"OrderedReady"` will create pods in strictly increasing order on scale up and strictly decreasing order on scale down, progressing only when the previous pod is ready or terminated. At most one pod will be changed at any time.
/// - `"Parallel"` will create and delete pods as soon as the stateful set replica count is changed, and will not wait for pods to be ready or complete termination.
/// </summary>
[Input("podManagementPolicy")]
public Input<string>? PodManagementPolicy { get; set; }
Expand Down
Loading

0 comments on commit 2a287d4

Please sign in to comment.