Skip to content

Commit

Permalink
Add support for k8s 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Apr 5, 2021
1 parent 975064e commit 034b18e
Show file tree
Hide file tree
Showing 276 changed files with 22,100 additions and 1,090 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## HEAD (Unreleased)

- Add support for k8s v1.21.0. (https://github.com/pulumi/pulumi-kubernetes/pull/1449)

## 2.8.4 (March 29, 2021)

- Ensure using `PULUMI_KUBERNETES_MANAGED_BY_LABEL` doesn't cause diffs on further stack updates (https://github.com/pulumi/pulumi-kubernetes/pull/1508)
Expand Down
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/v2
VERSION_PATH := ${PROVIDER_PATH}/pkg/version.Version

KUBE_VERSION ?= v1.20.0
KUBE_VERSION ?= v1.21.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
2,612 changes: 2,182 additions & 430 deletions provider/cmd/pulumi-resource-kubernetes/schema.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ require (
github.com/onsi/ginkgo v1.12.0 // indirect
github.com/onsi/gomega v1.9.0 // indirect
github.com/pkg/errors v0.9.1
github.com/pulumi/pulumi/pkg/v2 v2.23.2
github.com/pulumi/pulumi/sdk/v2 v2.23.2
github.com/pulumi/pulumi/pkg/v2 v2.24.1
github.com/pulumi/pulumi/sdk/v2 v2.24.1
github.com/stretchr/testify v1.7.0
google.golang.org/grpc v1.34.0
helm.sh/helm/v3 v3.5.2
Expand Down
8 changes: 4 additions & 4 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -922,10 +922,10 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4=
github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/pulumi/pulumi/pkg/v2 v2.23.2 h1:ru9seiGJM8By7AoDCMfkTXO0ETJz5f5Kn5AjQ2UPbI4=
github.com/pulumi/pulumi/pkg/v2 v2.23.2/go.mod h1:NIXOUdL8dp/FbWENt57+uyh00zcbF3H6sQ6GmrsrHuE=
github.com/pulumi/pulumi/sdk/v2 v2.23.2 h1:7bEx7U/rpK8IKNSc+b9WfJ5f+gVkLpfWvUakbPvDBXw=
github.com/pulumi/pulumi/sdk/v2 v2.23.2/go.mod h1:sHQdzD0/cIopR5uLeoikXi1pNBv5SwA4M617VqdIA3E=
github.com/pulumi/pulumi/pkg/v2 v2.24.1 h1:rTgUJiB3K/JwzuzGtNkEN1j6qnDzmM2w/eF6MbT9EVQ=
github.com/pulumi/pulumi/pkg/v2 v2.24.1/go.mod h1:hq6KcDEklytmMrL5aexH19GP2f5GX2IeveICJXaKHc0=
github.com/pulumi/pulumi/sdk/v2 v2.24.1 h1:bmFDjdlYinnjQu5jeR+D4+k8aQuEhxIfJ/N3nOSaYiY=
github.com/pulumi/pulumi/sdk/v2 v2.24.1/go.mod h1:sHQdzD0/cIopR5uLeoikXi1pNBv5SwA4M617VqdIA3E=
github.com/qri-io/starlib v0.4.2-0.20200213133954-ff2e8cd5ef8d/go.mod h1:7DPO4domFU579Ga6E61sB9VFNaniPVwJP5C4bBCu3wA=
github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
Expand Down
5 changes: 5 additions & 0 deletions provider/pkg/kinds/kinds.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const (
CSIDriverList Kind = "CSIDriverList"
CSINode Kind = "CSINode"
CSINodeList Kind = "CSINodeList"
CSIStorageCapacity Kind = "CSIStorageCapacity"
CSIStorageCapacityList Kind = "CSIStorageCapacityList"
CertificateSigningRequest Kind = "CertificateSigningRequest"
CertificateSigningRequestList Kind = "CertificateSigningRequestList"
ClusterRole Kind = "ClusterRole"
Expand All @@ -58,6 +60,7 @@ const (
EndpointSliceList Kind = "EndpointSliceList"
Endpoints Kind = "Endpoints"
EndpointsList Kind = "EndpointsList"
EphemeralContainers Kind = "EphemeralContainers"
Event Kind = "Event"
EventList Kind = "EventList"
FlowSchema Kind = "FlowSchema"
Expand Down Expand Up @@ -229,6 +232,7 @@ const (
CoordinationV1 groupVersion = "coordination.k8s.io/v1"
CoordinationV1B1 groupVersion = "coordination.k8s.io/v1beta1"
CoreV1 groupVersion = "core/v1"
DiscoveryV1 groupVersion = "discovery.k8s.io/v1"
DiscoveryV1B1 groupVersion = "discovery.k8s.io/v1beta1"
EventsV1 groupVersion = "events.k8s.io/v1"
EventsV1B1 groupVersion = "events.k8s.io/v1beta1"
Expand All @@ -241,6 +245,7 @@ const (
NodeV1 groupVersion = "node.k8s.io/v1"
NodeV1A1 groupVersion = "node.k8s.io/v1alpha1"
NodeV1B1 groupVersion = "node.k8s.io/v1beta1"
PolicyV1 groupVersion = "policy/v1"
PolicyV1B1 groupVersion = "policy/v1beta1"
RbacV1 groupVersion = "rbac.authorization.k8s.io/v1"
RbacV1A1 groupVersion = "rbac.authorization.k8s.io/v1alpha1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1.RuleWit
}

/// <summary>
/// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
/// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
/// </summary>
[Input("sideEffects", required: true)]
public Input<string> SideEffects { get; set; } = null!;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1.RuleWit
}

/// <summary>
/// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
/// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
/// </summary>
[Input("sideEffects", required: true)]
public Input<string> SideEffects { get; set; } = null!;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public sealed class MutatingWebhook
/// </summary>
public readonly ImmutableArray<Pulumi.Kubernetes.Types.Outputs.AdmissionRegistration.V1.RuleWithOperations> Rules;
/// <summary>
/// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
/// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
/// </summary>
public readonly string SideEffects;
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public sealed class ValidatingWebhook
/// </summary>
public readonly ImmutableArray<Pulumi.Kubernetes.Types.Outputs.AdmissionRegistration.V1.RuleWithOperations> Rules;
/// <summary>
/// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
/// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
/// </summary>
public readonly string SideEffects;
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Beta1.Ru
}

/// <summary>
/// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.
/// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.
/// </summary>
[Input("sideEffects")]
public Input<string>? SideEffects { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Beta1.Ru
}

/// <summary>
/// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.
/// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.
/// </summary>
[Input("sideEffects")]
public Input<string>? SideEffects { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public sealed class MutatingWebhook
/// </summary>
public readonly ImmutableArray<Pulumi.Kubernetes.Types.Outputs.AdmissionRegistration.V1Beta1.RuleWithOperations> Rules;
/// <summary>
/// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.
/// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.
/// </summary>
public readonly string SideEffects;
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public sealed class ValidatingWebhook
/// </summary>
public readonly ImmutableArray<Pulumi.Kubernetes.Types.Outputs.AdmissionRegistration.V1Beta1.RuleWithOperations> Rules;
/// <summary>
/// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.
/// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.
/// </summary>
public readonly string SideEffects;
/// <summary>
Expand Down
8 changes: 7 additions & 1 deletion sdk/dotnet/Apps/V1/Inputs/RollingUpdateDaemonSetArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ namespace Pulumi.Kubernetes.Types.Inputs.Apps.V1
public class RollingUpdateDaemonSetArgs : Pulumi.ResourceArgs
{
/// <summary>
/// The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.
/// The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate.
/// </summary>
[Input("maxSurge")]
public InputUnion<int, string>? MaxSurge { get; set; }

/// <summary>
/// The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.
/// </summary>
[Input("maxUnavailable")]
public InputUnion<int, string>? MaxUnavailable { get; set; }
Expand Down
Loading

0 comments on commit 034b18e

Please sign in to comment.