Skip to content

Commit

Permalink
Update Kubernetes support to Kubernetes v1.26.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Dec 9, 2022
1 parent 8a8d523 commit 5c99236
Show file tree
Hide file tree
Showing 901 changed files with 127,062 additions and 25,278 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,9 @@
## Unreleased

## 3.23.0 (December 8, 2022)

- Expose the allowNullValues boolean as an InputProperty so that it can be set in SDKs (https://github.com/pulumi/pulumi-kubernetes/pulls/2255)
- Update Kubernetes support to Kubernetes v1.26.0 (https://github.com/pulumi/pulumi-kubernetes/pull/2230)

## 3.22.2 (November 30, 2022)

Expand Down
2 changes: 1 addition & 1 deletion Makefile
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.25.0
KUBE_VERSION ?= v1.26.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
52,831 changes: 29,051 additions & 23,780 deletions provider/cmd/pulumi-resource-kubernetes/schema.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions provider/pkg/gen/dotnet.go
Expand Up @@ -41,13 +41,15 @@ var pascalCaseMapping = map[string]string{
"node": "Node",
"policy": "Policy",
"rbac": "Rbac",
"resource": "Resource",
"scheduling": "Scheduling",
"settings": "Settings",
"storage": "Storage",
"v1": "V1",
"v1alpha1": "V1Alpha1",
"v1beta1": "V1Beta1",
"v1beta2": "V1Beta2",
"v1beta3": "V1Beta3",
"v2": "V2",
"v2alpha1": "V2Alpha1",
"v2beta1": "V2Beta1",
Expand Down
241 changes: 131 additions & 110 deletions provider/pkg/kinds/kinds.go

Large diffs are not rendered by default.

101 changes: 101 additions & 0 deletions sdk/dotnet/AdmissionRegistration/V1Alpha1/Inputs/MatchResourcesArgs.cs
@@ -0,0 +1,101 @@
// *** 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>
/// MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
/// </summary>
public class MatchResourcesArgs : global::Pulumi.ResourceArgs
{
[Input("excludeResourceRules")]
private InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Alpha1.NamedRuleWithOperationsArgs>? _excludeResourceRules;

/// <summary>
/// ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
/// </summary>
public InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Alpha1.NamedRuleWithOperationsArgs> ExcludeResourceRules
{
get => _excludeResourceRules ?? (_excludeResourceRules = new InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Alpha1.NamedRuleWithOperationsArgs>());
set => _excludeResourceRules = value;
}

/// <summary>
/// matchPolicy defines how the "MatchResources" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
///
/// - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.
///
/// - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.
///
/// Defaults to "Equivalent"
/// </summary>
[Input("matchPolicy")]
public Input<string>? MatchPolicy { get; set; }

/// <summary>
/// NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.
///
/// For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": {
/// "matchExpressions": [
/// {
/// "key": "runlevel",
/// "operator": "NotIn",
/// "values": [
/// "0",
/// "1"
/// ]
/// }
/// ]
/// }
///
/// If instead you want to only run the policy on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": {
/// "matchExpressions": [
/// {
/// "key": "environment",
/// "operator": "In",
/// "values": [
/// "prod",
/// "staging"
/// ]
/// }
/// ]
/// }
///
/// See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
///
/// Default to the empty LabelSelector, which matches everything.
/// </summary>
[Input("namespaceSelector")]
public Input<Pulumi.Kubernetes.Types.Inputs.Meta.V1.LabelSelectorArgs>? NamespaceSelector { get; set; }

/// <summary>
/// ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.
/// </summary>
[Input("objectSelector")]
public Input<Pulumi.Kubernetes.Types.Inputs.Meta.V1.LabelSelectorArgs>? ObjectSelector { get; set; }

[Input("resourceRules")]
private InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Alpha1.NamedRuleWithOperationsArgs>? _resourceRules;

/// <summary>
/// ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.
/// </summary>
public InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Alpha1.NamedRuleWithOperationsArgs> ResourceRules
{
get => _resourceRules ?? (_resourceRules = new InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Alpha1.NamedRuleWithOperationsArgs>());
set => _resourceRules = value;
}

public MatchResourcesArgs()
{
}
public static new MatchResourcesArgs Empty => new MatchResourcesArgs();
}
}
@@ -0,0 +1,101 @@
// *** 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>
/// MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
/// </summary>
public class MatchResourcesPatchArgs : global::Pulumi.ResourceArgs
{
[Input("excludeResourceRules")]
private InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Alpha1.NamedRuleWithOperationsPatchArgs>? _excludeResourceRules;

/// <summary>
/// ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
/// </summary>
public InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Alpha1.NamedRuleWithOperationsPatchArgs> ExcludeResourceRules
{
get => _excludeResourceRules ?? (_excludeResourceRules = new InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Alpha1.NamedRuleWithOperationsPatchArgs>());
set => _excludeResourceRules = value;
}

/// <summary>
/// matchPolicy defines how the "MatchResources" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
///
/// - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.
///
/// - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.
///
/// Defaults to "Equivalent"
/// </summary>
[Input("matchPolicy")]
public Input<string>? MatchPolicy { get; set; }

/// <summary>
/// NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.
///
/// For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": {
/// "matchExpressions": [
/// {
/// "key": "runlevel",
/// "operator": "NotIn",
/// "values": [
/// "0",
/// "1"
/// ]
/// }
/// ]
/// }
///
/// If instead you want to only run the policy on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": {
/// "matchExpressions": [
/// {
/// "key": "environment",
/// "operator": "In",
/// "values": [
/// "prod",
/// "staging"
/// ]
/// }
/// ]
/// }
///
/// See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
///
/// Default to the empty LabelSelector, which matches everything.
/// </summary>
[Input("namespaceSelector")]
public Input<Pulumi.Kubernetes.Types.Inputs.Meta.V1.LabelSelectorPatchArgs>? NamespaceSelector { get; set; }

/// <summary>
/// ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.
/// </summary>
[Input("objectSelector")]
public Input<Pulumi.Kubernetes.Types.Inputs.Meta.V1.LabelSelectorPatchArgs>? ObjectSelector { get; set; }

[Input("resourceRules")]
private InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Alpha1.NamedRuleWithOperationsPatchArgs>? _resourceRules;

/// <summary>
/// ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.
/// </summary>
public InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Alpha1.NamedRuleWithOperationsPatchArgs> ResourceRules
{
get => _resourceRules ?? (_resourceRules = new InputList<Pulumi.Kubernetes.Types.Inputs.AdmissionRegistration.V1Alpha1.NamedRuleWithOperationsPatchArgs>());
set => _resourceRules = value;
}

public MatchResourcesPatchArgs()
{
}
public static new MatchResourcesPatchArgs Empty => new MatchResourcesPatchArgs();
}
}
@@ -0,0 +1,95 @@
// *** 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>
/// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
/// </summary>
public class NamedRuleWithOperationsArgs : global::Pulumi.ResourceArgs
{
[Input("apiGroups")]
private InputList<string>? _apiGroups;

/// <summary>
/// APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
/// </summary>
public InputList<string> ApiGroups
{
get => _apiGroups ?? (_apiGroups = new InputList<string>());
set => _apiGroups = value;
}

[Input("apiVersions")]
private InputList<string>? _apiVersions;

/// <summary>
/// APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
/// </summary>
public InputList<string> ApiVersions
{
get => _apiVersions ?? (_apiVersions = new InputList<string>());
set => _apiVersions = value;
}

[Input("operations")]
private InputList<string>? _operations;

/// <summary>
/// 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
{
get => _operations ?? (_operations = new InputList<string>());
set => _operations = value;
}

[Input("resourceNames")]
private InputList<string>? _resourceNames;

/// <summary>
/// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
/// </summary>
public InputList<string> ResourceNames
{
get => _resourceNames ?? (_resourceNames = new InputList<string>());
set => _resourceNames = value;
}

[Input("resources")]
private InputList<string>? _resources;

/// <summary>
/// Resources is a list of resources this rule applies to.
///
/// For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.
///
/// If wildcard is present, the validation rule will ensure resources do not overlap with each other.
///
/// Depending on the enclosing object, subresources might not be allowed. Required.
/// </summary>
public InputList<string> Resources
{
get => _resources ?? (_resources = new InputList<string>());
set => _resources = value;
}

/// <summary>
/// scope specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*".
/// </summary>
[Input("scope")]
public Input<string>? Scope { get; set; }

public NamedRuleWithOperationsArgs()
{
}
public static new NamedRuleWithOperationsArgs Empty => new NamedRuleWithOperationsArgs();
}
}

0 comments on commit 5c99236

Please sign in to comment.