Skip to content

Commit

Permalink
Upgrade Kubernetes schema and client libraries to v1.32 (#3343)
Browse files Browse the repository at this point in the history
<!--Thanks for your contribution. See [CONTRIBUTING](CONTRIBUTING.md)
    for Pulumi's contribution guidelines.

    Help us merge your changes more quickly by adding more details such
    as labels, milestones, and reviewers.-->

### Proposed changes
Upgrade Kubernetes schema and client libraries to v1.32. Go is also
updated to v1.23 as an upstream library requires this.

### Related issues (optional)
Closes: #3295
  • Loading branch information
rquitales authored Dec 12, 2024
1 parent cce7961 commit e5d0c61
Show file tree
Hide file tree
Showing 876 changed files with 106,901 additions and 19,034 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## Unreleased

## 4.19.0 (December 11, 2024)

### Changed

- Updated Kubernetes schemas and libraries to v1.32.0. (https://github.com/pulumi/pulumi-kubernetes/pull/3343)

## 4.18.4 (December 5, 2024)

### Changed
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 @@ CODEGEN := pulumi-gen-${PACK}
PROVIDER_PATH := provider/v4
VERSION_PATH := ${PROVIDER_PATH}/pkg/version.Version

KUBE_VERSION ?= v1.31.0
KUBE_VERSION ?= v1.32.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
10 changes: 7 additions & 3 deletions provider/cmd/pulumi-gen-kubernetes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,17 @@ func generateSchema(swaggerPath string) schema.PackageSpec {
// - apps/v1beta2/*
// - networking/v1beta1/IngressClass
// - flowcontrol/v1beta2/* (removed in v1.29, and has schema changes in v1.28)
// - resource.k8s.io/v1alpha2 (removed in v1.31)
// - networking.k8s.io/v1alpha1 (removed in v1.31)
// Removed in v1.31:
// - resource.k8s.io/v1alpha2
// - networking.k8s.io/v1alpha1
// Removed in v1.32:
// - coordination.k8s.io/v1alpha1
// - resource.k8s.io/v1alpha3
// Since these resources will continue to be important to users for the foreseeable future, we will merge in
// newer specs on top of this spec so that these resources continue to be available in our SDKs.
urlFmt := "https://raw.githubusercontent.com/kubernetes/kubernetes/v1.%s.0/api/openapi-spec/swagger.json"
filenameFmt := "swagger-v1.%s.0.json"
for _, v := range []string{"17", "18", "19", "20", "26", "28", "30"} {
for _, v := range []string{"17", "18", "19", "20", "26", "28", "30", "31"} {
legacySwaggerPath := filepath.Join(swaggerDir, fmt.Sprintf(filenameFmt, v))
err = DownloadFile(legacySwaggerPath, fmt.Sprintf(urlFmt, v))
if err != nil {
Expand Down
30,756 changes: 17,573 additions & 13,183 deletions provider/cmd/pulumi-resource-kubernetes/schema.json

Large diffs are not rendered by default.

232 changes: 116 additions & 116 deletions provider/go.mod

Large diffs are not rendered by default.

287 changes: 145 additions & 142 deletions provider/go.sum

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions provider/pkg/kinds/kinds.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ const (
LeaseList Kind = "LeaseList"
LimitRange Kind = "LimitRange"
LimitRangeList Kind = "LimitRangeList"
MutatingAdmissionPolicy Kind = "MutatingAdmissionPolicy"
MutatingAdmissionPolicyBinding Kind = "MutatingAdmissionPolicyBinding"
MutatingAdmissionPolicyBindingList Kind = "MutatingAdmissionPolicyBindingList"
MutatingAdmissionPolicyList Kind = "MutatingAdmissionPolicyList"
MutatingWebhookConfiguration Kind = "MutatingWebhookConfiguration"
MutatingWebhookConfigurationList Kind = "MutatingWebhookConfigurationList"
Namespace Kind = "Namespace"
Expand Down Expand Up @@ -262,6 +266,7 @@ const (
CertificatesV1B1 groupVersion = "certificates.k8s.io/v1beta1"
CoordinationV1 groupVersion = "coordination.k8s.io/v1"
CoordinationV1A1 groupVersion = "coordination.k8s.io/v1alpha1"
CoordinationV1A2 groupVersion = "coordination.k8s.io/v1alpha2"
CoordinationV1B1 groupVersion = "coordination.k8s.io/v1beta1"
CoreV1 groupVersion = "core/v1"
DiscoveryV1 groupVersion = "discovery.k8s.io/v1"
Expand Down Expand Up @@ -289,6 +294,7 @@ const (
ResourceV1A1 groupVersion = "resource.k8s.io/v1alpha1"
ResourceV1A2 groupVersion = "resource.k8s.io/v1alpha2"
ResourceV1A3 groupVersion = "resource.k8s.io/v1alpha3"
ResourceV1B1 groupVersion = "resource.k8s.io/v1beta1"
SchedulingV1 groupVersion = "scheduling.k8s.io/v1"
SchedulingV1A1 groupVersion = "scheduling.k8s.io/v1alpha1"
SchedulingV1B1 groupVersion = "scheduling.k8s.io/v1beta1"
Expand Down Expand Up @@ -336,6 +342,7 @@ var KnownGroupVersions = codegen.NewStringSet(
"certificates.k8s.io/v1beta1",
"coordination.k8s.io/v1",
"coordination.k8s.io/v1alpha1",
"coordination.k8s.io/v1alpha2",
"coordination.k8s.io/v1beta1",
"core/v1",
"discovery.k8s.io/v1",
Expand Down Expand Up @@ -363,6 +370,7 @@ var KnownGroupVersions = codegen.NewStringSet(
"resource.k8s.io/v1alpha1",
"resource.k8s.io/v1alpha2",
"resource.k8s.io/v1alpha3",
"resource.k8s.io/v1beta1",
"scheduling.k8s.io/v1",
"scheduling.k8s.io/v1alpha1",
"scheduling.k8s.io/v1beta1",
Expand All @@ -381,6 +389,8 @@ var ListQualifiedTypes = codegen.NewStringSet(
"kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyBindingList",
"kubernetes:admissionregistration.k8s.io/v1:ValidatingAdmissionPolicyList",
"kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfigurationList",
"kubernetes:admissionregistration.k8s.io/v1alpha1:MutatingAdmissionPolicyBindingList",
"kubernetes:admissionregistration.k8s.io/v1alpha1:MutatingAdmissionPolicyList",
"kubernetes:admissionregistration.k8s.io/v1alpha1:ValidatingAdmissionPolicyBindingList",
"kubernetes:admissionregistration.k8s.io/v1alpha1:ValidatingAdmissionPolicyList",
"kubernetes:admissionregistration.k8s.io/v1beta1:MutatingWebhookConfigurationList",
Expand Down Expand Up @@ -418,6 +428,7 @@ var ListQualifiedTypes = codegen.NewStringSet(
"kubernetes:certificates.k8s.io/v1beta1:CertificateSigningRequestList",
"kubernetes:coordination.k8s.io/v1:LeaseList",
"kubernetes:coordination.k8s.io/v1alpha1:LeaseCandidateList",
"kubernetes:coordination.k8s.io/v1alpha2:LeaseCandidateList",
"kubernetes:coordination.k8s.io/v1beta1:LeaseList",
"kubernetes:core/v1:ConfigMapList",
"kubernetes:core/v1:EndpointsList",
Expand Down Expand Up @@ -497,6 +508,11 @@ var ListQualifiedTypes = codegen.NewStringSet(
"kubernetes:resource.k8s.io/v1alpha3:PodSchedulingContextList",
"kubernetes:resource.k8s.io/v1alpha3:ResourceClaimList",
"kubernetes:resource.k8s.io/v1alpha3:ResourceClaimTemplateList",
"kubernetes:resource.k8s.io/v1alpha3:ResourceSliceList",
"kubernetes:resource.k8s.io/v1beta1:DeviceClassList",
"kubernetes:resource.k8s.io/v1beta1:ResourceClaimList",
"kubernetes:resource.k8s.io/v1beta1:ResourceClaimTemplateList",
"kubernetes:resource.k8s.io/v1beta1:ResourceSliceList",
"kubernetes:scheduling.k8s.io/v1:PriorityClassList",
"kubernetes:scheduling.k8s.io/v1alpha1:PriorityClassList",
"kubernetes:scheduling.k8s.io/v1beta1:PriorityClassList",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class ValidatingAdmissionPolicyBindingSpecArgs : global::Pulumi.ResourceA
///
/// "Warn" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.
///
/// "Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{"message": "Invalid value", {"policy": "policy.example.com", {"binding": "policybinding.example.com", {"expressionIndex": "1", {"validationActions": ["Audit"]}]"`
/// "Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"`
///
/// Clients should expect to handle additional values by ignoring any values not recognized.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class ValidatingAdmissionPolicyBindingSpecPatchArgs : global::Pulumi.Reso
///
/// "Warn" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.
///
/// "Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{"message": "Invalid value", {"policy": "policy.example.com", {"binding": "policybinding.example.com", {"expressionIndex": "1", {"validationActions": ["Audit"]}]"`
/// "Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"`
///
/// Clients should expect to handle additional values by ignoring any values not recognized.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public sealed class ValidatingAdmissionPolicyBindingSpec
///
/// "Warn" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.
///
/// "Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{"message": "Invalid value", {"policy": "policy.example.com", {"binding": "policybinding.example.com", {"expressionIndex": "1", {"validationActions": ["Audit"]}]"`
/// "Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"`
///
/// Clients should expect to handle additional values by ignoring any values not recognized.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public sealed class ValidatingAdmissionPolicyBindingSpecPatch
///
/// "Warn" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.
///
/// "Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{"message": "Invalid value", {"policy": "policy.example.com", {"binding": "policybinding.example.com", {"expressionIndex": "1", {"validationActions": ["Audit"]}]"`
/// "Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"`
///
/// Clients should expect to handle additional values by ignoring any values not recognized.
///
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// *** 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.AdmissionRegistration.V1Alpha1
{

/// <summary>
/// ApplyConfiguration defines the desired configuration values of an object.
/// </summary>
public class ApplyConfigurationArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// expression will be evaluated by CEL to create an apply configuration. ref: https://github.com/google/cel-spec
///
/// Apply configurations are declared in CEL using object initialization. For example, this CEL expression returns an apply configuration to set a single field:
///
/// Object{
/// spec: Object.spec{
/// serviceAccountName: "example"
/// }
/// }
///
/// Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of values not included in the apply configuration.
///
/// CEL expressions have access to the object types needed to create apply configurations:
///
/// - 'Object' - CEL type of the resource object. - 'Object.&lt;fieldName&gt;' - CEL type of object field (such as 'Object.spec') - 'Object.&lt;fieldName1&gt;.&lt;fieldName2&gt;...&lt;fieldNameN&gt;` - CEL type of nested field (such as 'Object.spec.containers')
///
/// CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:
///
/// - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
/// For example, a variable named 'foo' can be accessed as 'variables.foo'.
/// - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
/// See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
/// - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
/// request resource.
///
/// The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.
///
/// Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required.
/// </summary>
[Input("expression")]
public Input<string>? Expression { get; set; }

public ApplyConfigurationArgs()
{
}
public static new ApplyConfigurationArgs Empty => new ApplyConfigurationArgs();
}
}
Loading

0 comments on commit e5d0c61

Please sign in to comment.