Discover modules > cue.dev/x/crd/kyverno.io > v2
v0.9.0
#CleanupPolicy: ¶

CleanupPolicy defines a rule for resource cleanup.

apiVersion:
click to see definition
string
& "kyverno.io/v2"
¶

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind:
click to see definition
string
& "CleanupPolicy"
¶

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata!: ¶
name!: string ¶
namespace!: string ¶
labels?: ¶
[string]: string ¶
annotations?: ¶
[string]: string ¶
spec!: ¶

Spec declares policy behaviors.

conditions?: ¶

Conditions defines the conditions used to select the resources which will be cleaned up.

all?:
click to see definition
[...{
	// Key is the context entry (using JMESPath) for conditional rule evaluation.
	key?: null | bool | number | string | [...] | {...}

	// Message is an optional display message
	message?: string

	// Operator is the conditional operation to perform. Valid operators are:
	// Equals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,
	// GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,
	// DurationLessThanOrEquals, DurationLessThan
	operator?: "Equals" |
		"NotEquals" |
		"AnyIn" |
		"AllIn" |
		"AnyNotIn" |
		"AllNotIn" |
		"GreaterThanOrEquals" |
		"GreaterThan" |
		"LessThanOrEquals" |
		"LessThan" |
		"DurationGreaterThanOrEquals" |
		"DurationGreaterThan" |
		"DurationLessThanOrEquals" |
		"DurationLessThan"

	// Value is the conditional value, or set of values. The values can be fixed set
	// or can be variables declared using JMESPath.
	value?: null | bool | number | string | [...] | {...}
}]
¶

AllConditions enable variable-based conditional rule execution. This is useful for finer control of when an rule is applied. A condition can reference object data using JMESPath notation. Here, all of the conditions need to pass.

[...]:
key?: null | bool | number | string | [...] | {...}

Key is the context entry (using JMESPath) for conditional rule evaluation.

message?: string

Message is an optional display message

operator?:
click to see definition
"Equals" |
	"NotEquals" |
	"AnyIn" |
	"AllIn" |
	"AnyNotIn" |
	"AllNotIn" |
	"GreaterThanOrEquals" |
	"GreaterThan" |
	"LessThanOrEquals" |
	"LessThan" |
	"DurationGreaterThanOrEquals" |
	"DurationGreaterThan" |
	"DurationLessThanOrEquals" |
	"DurationLessThan"

Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan, DurationLessThanOrEquals, DurationLessThan

value?: null | bool | number | string | [...] | {...}

Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using JMESPath.

any?:
click to see definition
[...{
	// Key is the context entry (using JMESPath) for conditional rule evaluation.
	key?: null | bool | number | string | [...] | {...}

	// Message is an optional display message
	message?: string

	// Operator is the conditional operation to perform. Valid operators are:
	// Equals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,
	// GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,
	// DurationLessThanOrEquals, DurationLessThan
	operator?: "Equals" |
		"NotEquals" |
		"AnyIn" |
		"AllIn" |
		"AnyNotIn" |
		"AllNotIn" |
		"GreaterThanOrEquals" |
		"GreaterThan" |
		"LessThanOrEquals" |
		"LessThan" |
		"DurationGreaterThanOrEquals" |
		"DurationGreaterThan" |
		"DurationLessThanOrEquals" |
		"DurationLessThan"

	// Value is the conditional value, or set of values. The values can be fixed set
	// or can be variables declared using JMESPath.
	value?: null | bool | number | string | [...] | {...}
}]
¶

AnyConditions enable variable-based conditional rule execution. This is useful for finer control of when an rule is applied. A condition can reference object data using JMESPath notation. Here, at least one of the conditions need to pass.

[...]:
key?: null | bool | number | string | [...] | {...}

Key is the context entry (using JMESPath) for conditional rule evaluation.

message?: string

Message is an optional display message

operator?:
click to see definition
"Equals" |
	"NotEquals" |
	"AnyIn" |
	"AllIn" |
	"AnyNotIn" |
	"AllNotIn" |
	"GreaterThanOrEquals" |
	"GreaterThan" |
	"LessThanOrEquals" |
	"LessThan" |
	"DurationGreaterThanOrEquals" |
	"DurationGreaterThan" |
	"DurationLessThanOrEquals" |
	"DurationLessThan"

Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan, DurationLessThanOrEquals, DurationLessThan

value?: null | bool | number | string | [...] | {...}

Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using JMESPath.

context?:
click to see definition
[...matchN(1, [
	{configMap!: _}, {apiCall!: _}, {imageRegistry!: _}, {variable!: _}, {globalReference!: _},
]) & {
	// APICall is an HTTP request to the Kubernetes API server, or other JSON web service.
	// The data returned is stored in the context with the name for the context entry.
	apiCall?: {
		// The data object specifies the POST data sent to the server.
		// Only applicable when the method field is set to POST.
		data?: [...{
			// Key is a unique identifier for the data value
			key!: string

			// Value is the data value
			value!: null | bool | number | string | [...] | {...}
		}]

		// Default is an optional arbitrary JSON object that the context
		// value is set to, if the apiCall returns error.
		default?: null | bool | number | string | [...] | {...}

		// JMESPath is an optional JSON Match Expression that can be used to
		// transform the JSON response returned from the server. For example
		// a JMESPath of "items | length(@)" applied to the API server response
		// for the URLPath "/apis/apps/v1/deployments" will return the total count
		// of deployments across all namespaces.
		jmesPath?: string

		// Method is the HTTP request type (GET or POST). Defaults to GET.
		method?: "GET" | "POST"

		// Service is an API call to a JSON web service.
		// This is used for non-Kubernetes API server calls.
		// It's mutually exclusive with the URLPath field.
		service?: {
			// CABundle is a PEM encoded CA bundle which will be used to validate
			// the server certificate.
			caBundle?: string

			// Headers is a list of optional HTTP headers to be included in the request.
			headers?: [...{
				// Key is the header key
				key!: string

				// Value is the header value
				value!: string
			}]

			// URL is the JSON web service URL. A typical form is
			// `https://{service}.{namespace}:{port}/{path}`.
			url!: string
		}

		// URLPath is the URL path to be used in the HTTP GET or POST request to the
		// Kubernetes API server (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments").
		// The format required is the same format used by the `kubectl get --raw` command.
		// See
		// https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls
		// for details.
		// It's mutually exclusive with the Service field.
		urlPath?: string
	}

	// ConfigMap is the ConfigMap reference.
	configMap?: {
		// Name is the ConfigMap name.
		name!: string

		// Namespace is the ConfigMap namespace.
		namespace?: string
	}

	// GlobalContextEntryReference is a reference to a cached global context entry.
	globalReference?: {
		// JMESPath is an optional JSON Match Expression that can be used to
		// transform the JSON response returned from the server. For example
		// a JMESPath of "items | length(@)" applied to the API server response
		// for the URLPath "/apis/apps/v1/deployments" will return the total count
		// of deployments across all namespaces.
		jmesPath?: string

		// Name of the global context entry
		name!: string
	}

	// ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image
	// details.
	imageRegistry?: {
		// ImageRegistryCredentials provides credentials that will be used for authentication with registry
		imageRegistryCredentials?: {
			// AllowInsecureRegistry allows insecure access to a registry.
			allowInsecureRegistry?: bool

			// Providers specifies a list of OCI Registry names, whose authentication providers are provided.
			// It can be of one of these values: default,google,azure,amazon,github.
			providers?: [..."default" | "amazon" | "azure" | "google" | "github"]

			// Secrets specifies a list of secrets that are provided for credentials.
			// Secrets can be specified as a name (Kyverno namespace) or namespace/name.
			// imagePullSecrets from the resource namespace are also used.
			secrets?: [...string]
		}

		// JMESPath is an optional JSON Match Expression that can be used to
		// transform the ImageData struct returned as a result of processing
		// the image reference.
		jmesPath?: string

		// Reference is image reference to a container image in the registry.
		// Example: ghcr.io/kyverno/kyverno:latest
		reference!: string
	}

	// Name is the variable name.
	name!: string

	// Variable defines an arbitrary JMESPath context variable that can be defined inline.
	variable?: {
		// Default is an optional arbitrary JSON object that the variable may take if the JMESPath
		// expression evaluates to nil
		default?: null | bool | number | string | [...] | {...}

		// JMESPath is an optional JMESPath Expression that can be used to
		// transform the variable.
		jmesPath?: string

		// Value is any arbitrary JSON object representable in YAML or JSON form.
		value?: null | bool | number | string | [...] | {...}
	}
}]
¶

Context defines variables and data sources that can be used during rule execution.

[...]:
click to see definition
matchN(1, [
	{configMap!: _}, {apiCall!: _}, {imageRegistry!: _}, {variable!: _}, {globalReference!: _},
]) & {
	// APICall is an HTTP request to the Kubernetes API server, or other JSON web service.
	// The data returned is stored in the context with the name for the context entry.
	apiCall?: {
		// The data object specifies the POST data sent to the server.
		// Only applicable when the method field is set to POST.
		data?: [...{
			// Key is a unique identifier for the data value
			key!: string

			// Value is the data value
			value!: null | bool | number | string | [...] | {...}
		}]

		// Default is an optional arbitrary JSON object that the context
		// value is set to, if the apiCall returns error.
		default?: null | bool | number | string | [...] | {...}

		// JMESPath is an optional JSON Match Expression that can be used to
		// transform the JSON response returned from the server. For example
		// a JMESPath of "items | length(@)" applied to the API server response
		// for the URLPath "/apis/apps/v1/deployments" will return the total count
		// of deployments across all namespaces.
		jmesPath?: string

		// Method is the HTTP request type (GET or POST). Defaults to GET.
		method?: "GET" | "POST"

		// Service is an API call to a JSON web service.
		// This is used for non-Kubernetes API server calls.
		// It's mutually exclusive with the URLPath field.
		service?: {
			// CABundle is a PEM encoded CA bundle which will be used to validate
			// the server certificate.
			caBundle?: string

			// Headers is a list of optional HTTP headers to be included in the request.
			headers?: [...{
				// Key is the header key
				key!: string

				// Value is the header value
				value!: string
			}]

			// URL is the JSON web service URL. A typical form is
			// `https://{service}.{namespace}:{port}/{path}`.
			url!: string
		}

		// URLPath is the URL path to be used in the HTTP GET or POST request to the
		// Kubernetes API server (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments").
		// The format required is the same format used by the `kubectl get --raw` command.
		// See
		// https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls
		// for details.
		// It's mutually exclusive with the Service field.
		urlPath?: string
	}

	// ConfigMap is the ConfigMap reference.
	configMap?: {
		// Name is the ConfigMap name.
		name!: string

		// Namespace is the ConfigMap namespace.
		namespace?: string
	}

	// GlobalContextEntryReference is a reference to a cached global context entry.
	globalReference?: {
		// JMESPath is an optional JSON Match Expression that can be used to
		// transform the JSON response returned from the server. For example
		// a JMESPath of "items | length(@)" applied to the API server response
		// for the URLPath "/apis/apps/v1/deployments" will return the total count
		// of deployments across all namespaces.
		jmesPath?: string

		// Name of the global context entry
		name!: string
	}

	// ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image
	// details.
	imageRegistry?: {
		// ImageRegistryCredentials provides credentials that will be used for authentication with registry
		imageRegistryCredentials?: {
			// AllowInsecureRegistry allows insecure access to a registry.
			allowInsecureRegistry?: bool

			// Providers specifies a list of OCI Registry names, whose authentication providers are provided.
			// It can be of one of these values: default,google,azure,amazon,github.
			providers?: [..."default" | "amazon" | "azure" | "google" | "github"]

			// Secrets specifies a list of secrets that are provided for credentials.
			// Secrets can be specified as a name (Kyverno namespace) or namespace/name.
			// imagePullSecrets from the resource namespace are also used.
			secrets?: [...string]
		}

		// JMESPath is an optional JSON Match Expression that can be used to
		// transform the ImageData struct returned as a result of processing
		// the image reference.
		jmesPath?: string

		// Reference is image reference to a container image in the registry.
		// Example: ghcr.io/kyverno/kyverno:latest
		reference!: string
	}

	// Name is the variable name.
	name!: string

	// Variable defines an arbitrary JMESPath context variable that can be defined inline.
	variable?: {
		// Default is an optional arbitrary JSON object that the variable may take if the JMESPath
		// expression evaluates to nil
		default?: null | bool | number | string | [...] | {...}

		// JMESPath is an optional JMESPath Expression that can be used to
		// transform the variable.
		jmesPath?: string

		// Value is any arbitrary JSON object representable in YAML or JSON form.
		value?: null | bool | number | string | [...] | {...}
	}
}
apiCall?:

APICall is an HTTP request to the Kubernetes API server, or other JSON web service. The data returned is stored in the context with the name for the context entry.

data?:
click to see definition
[...{
	// Key is a unique identifier for the data value
	key!: string

	// Value is the data value
	value!: null | bool | number | string | [...] | {...}
}]

The data object specifies the POST data sent to the server. Only applicable when the method field is set to POST.

[...]:
key!: string

Key is a unique identifier for the data value

value!: null | bool | number | string | [...] | {...}

Value is the data value

default?: null | bool | number | string | [...] | {...}

Default is an optional arbitrary JSON object that the context value is set to, if the apiCall returns error.

jmesPath?: string

JMESPath is an optional JSON Match Expression that can be used to transform the JSON response returned from the server. For example a JMESPath of "items | length(@)" applied to the API server response for the URLPath "/apis/apps/v1/deployments" will return the total count of deployments across all namespaces.

method?: "GET" | "POST"

Method is the HTTP request type (GET or POST). Defaults to GET.

service?:

Service is an API call to a JSON web service. This is used for non-Kubernetes API server calls. It's mutually exclusive with the URLPath field.

caBundle?: string

CABundle is a PEM encoded CA bundle which will be used to validate the server certificate.

headers?:
click to see definition
[...{
	// Key is the header key
	key!: string

	// Value is the header value
	value!: string
}]

Headers is a list of optional HTTP headers to be included in the request.

[...]:
click to see definition
{
	// Key is the header key
	key!: string

	// Value is the header value
	value!: string
}
url!: string

URL is the JSON web service URL. A typical form is `https://{service}.{namespace}:{port}/{path}`.

urlPath?: string

URLPath is the URL path to be used in the HTTP GET or POST request to the Kubernetes API server (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments"). The format required is the same format used by the `kubectl get --raw` command. See https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls for details. It's mutually exclusive with the Service field.

configMap?:

ConfigMap is the ConfigMap reference.

name!: string

Name is the ConfigMap name.

namespace?: string

Namespace is the ConfigMap namespace.

globalReference?:

GlobalContextEntryReference is a reference to a cached global context entry.

jmesPath?: string

JMESPath is an optional JSON Match Expression that can be used to transform the JSON response returned from the server. For example a JMESPath of "items | length(@)" applied to the API server response for the URLPath "/apis/apps/v1/deployments" will return the total count of deployments across all namespaces.

name!: string

Name of the global context entry

imageRegistry?:

ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image details.

imageRegistryCredentials?:

ImageRegistryCredentials provides credentials that will be used for authentication with registry

allowInsecureRegistry?: bool

AllowInsecureRegistry allows insecure access to a registry.

providers?: [..."default" | "amazon" | "azure" | "google" | "github"]

Providers specifies a list of OCI Registry names, whose authentication providers are provided. It can be of one of these values: default,google,azure,amazon,github.

[...]: "default" | "amazon" | "azure" | "google" | "github"
secrets?: [...string]

Secrets specifies a list of secrets that are provided for credentials. Secrets can be specified as a name (Kyverno namespace) or namespace/name. imagePullSecrets from the resource namespace are also used.

[...]: string
jmesPath?: string

JMESPath is an optional JSON Match Expression that can be used to transform the ImageData struct returned as a result of processing the image reference.

reference!: string

Reference is image reference to a container image in the registry. Example: ghcr.io/kyverno/kyverno:latest

name!: string

Name is the variable name.

variable?:

Variable defines an arbitrary JMESPath context variable that can be defined inline.

default?: null | bool | number | string | [...] | {...}

Default is an optional arbitrary JSON object that the variable may take if the JMESPath expression evaluates to nil

jmesPath?: string

JMESPath is an optional JMESPath Expression that can be used to transform the variable.

value?: null | bool | number | string | [...] | {...}

Value is any arbitrary JSON object representable in YAML or JSON form.

deletionPropagationPolicy?: "Foreground" | "Background" | "Orphan" ¶

DeletionPropagationPolicy defines how resources will be deleted (Foreground, Background, Orphan).

exclude?: ¶

ExcludeResources defines when cleanuppolicy should not be applied. The exclude criteria can include resource information (e.g. kind, name, namespace, labels) and admission review request information like the name or role.

all?:
click to see definition
[...{
	// ClusterRoles is the list of cluster-wide role names for the user.
	clusterRoles?: [...string]

	// ResourceDescription contains information about the resource being created or modified.
	resources?: matchN(0, [null | bool | number | string | [...] | {
		name!:  _
		names!: _
	}]) & {
		// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
		// and values support the wildcard characters "*" (matches zero or many characters) and
		// "?" (matches at least one character).
		annotations?: [string]: string

		// Kinds is a list of resource kinds.
		kinds?: [...string]

		// Name is the name of the resource. The name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		// NOTE: "Name" is being deprecated in favor of "Names".
		name?: string

		// Names are the names of the resources. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		names?: [...string]

		// NamespaceSelector is a label selector for the resource namespace. Label keys and values
		// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
		// and `?` (matches one character).Wildcards allows writing label selectors like
		// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
		// does not match an empty label set.
		namespaceSelector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}

		// Namespaces is a list of namespaces names. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		namespaces?: [...string]

		// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
		// are used to match a specific action.
		operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

		// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
		// characters `*` (matches zero or many characters) and `?` (matches one character).
		// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
		// using ["*" : "*"] matches any key and value but does not match an empty label set.
		selector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}
	}

	// Roles is the list of namespaced role names for the user.
	roles?: [...string]

	// Subjects is the list of subject names like users, user groups, and service accounts.
	subjects?: [...{
		// APIGroup holds the API group of the referenced subject.
		// Defaults to "" for ServiceAccount subjects.
		// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
		apiGroup?: string

		// Kind of object being referenced. Values defined by this API group are "User",
		// "Group", and "ServiceAccount".
		// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
		kind!: string

		// Name of the object being referenced.
		name!: string

		// Namespace of the referenced object. If the object kind is non-namespace, such
		// as "User" or "Group", and this value is not empty
		// the Authorizer should report an error.
		namespace?: string
	}]
}]
¶

All allows specifying resources which will be ANDed

[...]:
clusterRoles?: [...string]

ClusterRoles is the list of cluster-wide role names for the user.

[...]: string
resources?:
click to see definition
matchN(0, [null | bool | number | string | [...] | {
	name!:  _
	names!: _
}]) & {
	// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
	// and values support the wildcard characters "*" (matches zero or many characters) and
	// "?" (matches at least one character).
	annotations?: [string]: string

	// Kinds is a list of resource kinds.
	kinds?: [...string]

	// Name is the name of the resource. The name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	// NOTE: "Name" is being deprecated in favor of "Names".
	name?: string

	// Names are the names of the resources. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	names?: [...string]

	// NamespaceSelector is a label selector for the resource namespace. Label keys and values
	// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
	// and `?` (matches one character).Wildcards allows writing label selectors like
	// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
	// does not match an empty label set.
	namespaceSelector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}

	// Namespaces is a list of namespaces names. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	namespaces?: [...string]

	// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
	// are used to match a specific action.
	operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

	// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
	// characters `*` (matches zero or many characters) and `?` (matches one character).
	// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
	// using ["*" : "*"] matches any key and value but does not match an empty label set.
	selector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}
}

ResourceDescription contains information about the resource being created or modified.

annotations?:

Annotations is a map of annotations (key-value pairs of type string). Annotation keys and values support the wildcard characters "*" (matches zero or many characters) and "?" (matches at least one character).

[string]: string
kinds?: [...string]

Kinds is a list of resource kinds.

[...]: string
name?: string

Name is the name of the resource. The name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character). NOTE: "Name" is being deprecated in favor of "Names".

names?: [...string]

Names are the names of the resources. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
namespaceSelector?:

NamespaceSelector is a label selector for the resource namespace. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character).Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

namespaces?: [...string]

Namespaces is a list of namespaces names. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which are used to match a specific action.

[...]: "CREATE" | "CONNECT" | "UPDATE" | "DELETE"
selector?:

Selector is a label selector. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character). Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

roles?: [...string]

Roles is the list of namespaced role names for the user.

[...]: string
subjects?:
click to see definition
[...{
	// APIGroup holds the API group of the referenced subject.
	// Defaults to "" for ServiceAccount subjects.
	// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
	apiGroup?: string

	// Kind of object being referenced. Values defined by this API group are "User",
	// "Group", and "ServiceAccount".
	// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
	kind!: string

	// Name of the object being referenced.
	name!: string

	// Namespace of the referenced object. If the object kind is non-namespace, such
	// as "User" or "Group", and this value is not empty
	// the Authorizer should report an error.
	namespace?: string
}]

Subjects is the list of subject names like users, user groups, and service accounts.

[...]:
apiGroup?: string

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.

kind!: string

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.

name!: string

Name of the object being referenced.

namespace?: string

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.

any?:
click to see definition
[...{
	// ClusterRoles is the list of cluster-wide role names for the user.
	clusterRoles?: [...string]

	// ResourceDescription contains information about the resource being created or modified.
	resources?: matchN(0, [null | bool | number | string | [...] | {
		name!:  _
		names!: _
	}]) & {
		// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
		// and values support the wildcard characters "*" (matches zero or many characters) and
		// "?" (matches at least one character).
		annotations?: [string]: string

		// Kinds is a list of resource kinds.
		kinds?: [...string]

		// Name is the name of the resource. The name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		// NOTE: "Name" is being deprecated in favor of "Names".
		name?: string

		// Names are the names of the resources. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		names?: [...string]

		// NamespaceSelector is a label selector for the resource namespace. Label keys and values
		// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
		// and `?` (matches one character).Wildcards allows writing label selectors like
		// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
		// does not match an empty label set.
		namespaceSelector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}

		// Namespaces is a list of namespaces names. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		namespaces?: [...string]

		// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
		// are used to match a specific action.
		operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

		// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
		// characters `*` (matches zero or many characters) and `?` (matches one character).
		// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
		// using ["*" : "*"] matches any key and value but does not match an empty label set.
		selector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}
	}

	// Roles is the list of namespaced role names for the user.
	roles?: [...string]

	// Subjects is the list of subject names like users, user groups, and service accounts.
	subjects?: [...{
		// APIGroup holds the API group of the referenced subject.
		// Defaults to "" for ServiceAccount subjects.
		// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
		apiGroup?: string

		// Kind of object being referenced. Values defined by this API group are "User",
		// "Group", and "ServiceAccount".
		// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
		kind!: string

		// Name of the object being referenced.
		name!: string

		// Namespace of the referenced object. If the object kind is non-namespace, such
		// as "User" or "Group", and this value is not empty
		// the Authorizer should report an error.
		namespace?: string
	}]
}]
¶

Any allows specifying resources which will be ORed

[...]:
clusterRoles?: [...string]

ClusterRoles is the list of cluster-wide role names for the user.

[...]: string
resources?:
click to see definition
matchN(0, [null | bool | number | string | [...] | {
	name!:  _
	names!: _
}]) & {
	// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
	// and values support the wildcard characters "*" (matches zero or many characters) and
	// "?" (matches at least one character).
	annotations?: [string]: string

	// Kinds is a list of resource kinds.
	kinds?: [...string]

	// Name is the name of the resource. The name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	// NOTE: "Name" is being deprecated in favor of "Names".
	name?: string

	// Names are the names of the resources. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	names?: [...string]

	// NamespaceSelector is a label selector for the resource namespace. Label keys and values
	// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
	// and `?` (matches one character).Wildcards allows writing label selectors like
	// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
	// does not match an empty label set.
	namespaceSelector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}

	// Namespaces is a list of namespaces names. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	namespaces?: [...string]

	// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
	// are used to match a specific action.
	operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

	// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
	// characters `*` (matches zero or many characters) and `?` (matches one character).
	// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
	// using ["*" : "*"] matches any key and value but does not match an empty label set.
	selector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}
}

ResourceDescription contains information about the resource being created or modified.

annotations?:

Annotations is a map of annotations (key-value pairs of type string). Annotation keys and values support the wildcard characters "*" (matches zero or many characters) and "?" (matches at least one character).

[string]: string
kinds?: [...string]

Kinds is a list of resource kinds.

[...]: string
name?: string

Name is the name of the resource. The name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character). NOTE: "Name" is being deprecated in favor of "Names".

names?: [...string]

Names are the names of the resources. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
namespaceSelector?:

NamespaceSelector is a label selector for the resource namespace. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character).Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

namespaces?: [...string]

Namespaces is a list of namespaces names. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which are used to match a specific action.

[...]: "CREATE" | "CONNECT" | "UPDATE" | "DELETE"
selector?:

Selector is a label selector. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character). Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

roles?: [...string]

Roles is the list of namespaced role names for the user.

[...]: string
subjects?:
click to see definition
[...{
	// APIGroup holds the API group of the referenced subject.
	// Defaults to "" for ServiceAccount subjects.
	// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
	apiGroup?: string

	// Kind of object being referenced. Values defined by this API group are "User",
	// "Group", and "ServiceAccount".
	// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
	kind!: string

	// Name of the object being referenced.
	name!: string

	// Namespace of the referenced object. If the object kind is non-namespace, such
	// as "User" or "Group", and this value is not empty
	// the Authorizer should report an error.
	namespace?: string
}]

Subjects is the list of subject names like users, user groups, and service accounts.

[...]:
apiGroup?: string

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.

kind!: string

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.

name!: string

Name of the object being referenced.

namespace?: string

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.

match!: ¶

MatchResources defines when cleanuppolicy should be applied. The match criteria can include resource information (e.g. kind, name, namespace, labels) and admission review request information like the user name or role. At least one kind is required.

all?:
click to see definition
[...{
	// ClusterRoles is the list of cluster-wide role names for the user.
	clusterRoles?: [...string]

	// ResourceDescription contains information about the resource being created or modified.
	resources?: matchN(0, [null | bool | number | string | [...] | {
		name!:  _
		names!: _
	}]) & {
		// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
		// and values support the wildcard characters "*" (matches zero or many characters) and
		// "?" (matches at least one character).
		annotations?: [string]: string

		// Kinds is a list of resource kinds.
		kinds?: [...string]

		// Name is the name of the resource. The name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		// NOTE: "Name" is being deprecated in favor of "Names".
		name?: string

		// Names are the names of the resources. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		names?: [...string]

		// NamespaceSelector is a label selector for the resource namespace. Label keys and values
		// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
		// and `?` (matches one character).Wildcards allows writing label selectors like
		// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
		// does not match an empty label set.
		namespaceSelector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}

		// Namespaces is a list of namespaces names. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		namespaces?: [...string]

		// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
		// are used to match a specific action.
		operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

		// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
		// characters `*` (matches zero or many characters) and `?` (matches one character).
		// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
		// using ["*" : "*"] matches any key and value but does not match an empty label set.
		selector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}
	}

	// Roles is the list of namespaced role names for the user.
	roles?: [...string]

	// Subjects is the list of subject names like users, user groups, and service accounts.
	subjects?: [...{
		// APIGroup holds the API group of the referenced subject.
		// Defaults to "" for ServiceAccount subjects.
		// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
		apiGroup?: string

		// Kind of object being referenced. Values defined by this API group are "User",
		// "Group", and "ServiceAccount".
		// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
		kind!: string

		// Name of the object being referenced.
		name!: string

		// Namespace of the referenced object. If the object kind is non-namespace, such
		// as "User" or "Group", and this value is not empty
		// the Authorizer should report an error.
		namespace?: string
	}]
}]
¶

All allows specifying resources which will be ANDed

[...]:
clusterRoles?: [...string]

ClusterRoles is the list of cluster-wide role names for the user.

[...]: string
resources?:
click to see definition
matchN(0, [null | bool | number | string | [...] | {
	name!:  _
	names!: _
}]) & {
	// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
	// and values support the wildcard characters "*" (matches zero or many characters) and
	// "?" (matches at least one character).
	annotations?: [string]: string

	// Kinds is a list of resource kinds.
	kinds?: [...string]

	// Name is the name of the resource. The name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	// NOTE: "Name" is being deprecated in favor of "Names".
	name?: string

	// Names are the names of the resources. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	names?: [...string]

	// NamespaceSelector is a label selector for the resource namespace. Label keys and values
	// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
	// and `?` (matches one character).Wildcards allows writing label selectors like
	// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
	// does not match an empty label set.
	namespaceSelector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}

	// Namespaces is a list of namespaces names. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	namespaces?: [...string]

	// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
	// are used to match a specific action.
	operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

	// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
	// characters `*` (matches zero or many characters) and `?` (matches one character).
	// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
	// using ["*" : "*"] matches any key and value but does not match an empty label set.
	selector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}
}

ResourceDescription contains information about the resource being created or modified.

annotations?:

Annotations is a map of annotations (key-value pairs of type string). Annotation keys and values support the wildcard characters "*" (matches zero or many characters) and "?" (matches at least one character).

[string]: string
kinds?: [...string]

Kinds is a list of resource kinds.

[...]: string
name?: string

Name is the name of the resource. The name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character). NOTE: "Name" is being deprecated in favor of "Names".

names?: [...string]

Names are the names of the resources. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
namespaceSelector?:

NamespaceSelector is a label selector for the resource namespace. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character).Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

namespaces?: [...string]

Namespaces is a list of namespaces names. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which are used to match a specific action.

[...]: "CREATE" | "CONNECT" | "UPDATE" | "DELETE"
selector?:

Selector is a label selector. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character). Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

roles?: [...string]

Roles is the list of namespaced role names for the user.

[...]: string
subjects?:
click to see definition
[...{
	// APIGroup holds the API group of the referenced subject.
	// Defaults to "" for ServiceAccount subjects.
	// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
	apiGroup?: string

	// Kind of object being referenced. Values defined by this API group are "User",
	// "Group", and "ServiceAccount".
	// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
	kind!: string

	// Name of the object being referenced.
	name!: string

	// Namespace of the referenced object. If the object kind is non-namespace, such
	// as "User" or "Group", and this value is not empty
	// the Authorizer should report an error.
	namespace?: string
}]

Subjects is the list of subject names like users, user groups, and service accounts.

[...]:
apiGroup?: string

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.

kind!: string

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.

name!: string

Name of the object being referenced.

namespace?: string

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.

any?:
click to see definition
[...{
	// ClusterRoles is the list of cluster-wide role names for the user.
	clusterRoles?: [...string]

	// ResourceDescription contains information about the resource being created or modified.
	resources?: matchN(0, [null | bool | number | string | [...] | {
		name!:  _
		names!: _
	}]) & {
		// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
		// and values support the wildcard characters "*" (matches zero or many characters) and
		// "?" (matches at least one character).
		annotations?: [string]: string

		// Kinds is a list of resource kinds.
		kinds?: [...string]

		// Name is the name of the resource. The name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		// NOTE: "Name" is being deprecated in favor of "Names".
		name?: string

		// Names are the names of the resources. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		names?: [...string]

		// NamespaceSelector is a label selector for the resource namespace. Label keys and values
		// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
		// and `?` (matches one character).Wildcards allows writing label selectors like
		// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
		// does not match an empty label set.
		namespaceSelector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}

		// Namespaces is a list of namespaces names. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		namespaces?: [...string]

		// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
		// are used to match a specific action.
		operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

		// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
		// characters `*` (matches zero or many characters) and `?` (matches one character).
		// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
		// using ["*" : "*"] matches any key and value but does not match an empty label set.
		selector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}
	}

	// Roles is the list of namespaced role names for the user.
	roles?: [...string]

	// Subjects is the list of subject names like users, user groups, and service accounts.
	subjects?: [...{
		// APIGroup holds the API group of the referenced subject.
		// Defaults to "" for ServiceAccount subjects.
		// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
		apiGroup?: string

		// Kind of object being referenced. Values defined by this API group are "User",
		// "Group", and "ServiceAccount".
		// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
		kind!: string

		// Name of the object being referenced.
		name!: string

		// Namespace of the referenced object. If the object kind is non-namespace, such
		// as "User" or "Group", and this value is not empty
		// the Authorizer should report an error.
		namespace?: string
	}]
}]
¶

Any allows specifying resources which will be ORed

[...]:
clusterRoles?: [...string]

ClusterRoles is the list of cluster-wide role names for the user.

[...]: string
resources?:
click to see definition
matchN(0, [null | bool | number | string | [...] | {
	name!:  _
	names!: _
}]) & {
	// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
	// and values support the wildcard characters "*" (matches zero or many characters) and
	// "?" (matches at least one character).
	annotations?: [string]: string

	// Kinds is a list of resource kinds.
	kinds?: [...string]

	// Name is the name of the resource. The name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	// NOTE: "Name" is being deprecated in favor of "Names".
	name?: string

	// Names are the names of the resources. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	names?: [...string]

	// NamespaceSelector is a label selector for the resource namespace. Label keys and values
	// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
	// and `?` (matches one character).Wildcards allows writing label selectors like
	// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
	// does not match an empty label set.
	namespaceSelector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}

	// Namespaces is a list of namespaces names. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	namespaces?: [...string]

	// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
	// are used to match a specific action.
	operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

	// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
	// characters `*` (matches zero or many characters) and `?` (matches one character).
	// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
	// using ["*" : "*"] matches any key and value but does not match an empty label set.
	selector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}
}

ResourceDescription contains information about the resource being created or modified.

annotations?:

Annotations is a map of annotations (key-value pairs of type string). Annotation keys and values support the wildcard characters "*" (matches zero or many characters) and "?" (matches at least one character).

[string]: string
kinds?: [...string]

Kinds is a list of resource kinds.

[...]: string
name?: string

Name is the name of the resource. The name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character). NOTE: "Name" is being deprecated in favor of "Names".

names?: [...string]

Names are the names of the resources. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
namespaceSelector?:

NamespaceSelector is a label selector for the resource namespace. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character).Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

namespaces?: [...string]

Namespaces is a list of namespaces names. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which are used to match a specific action.

[...]: "CREATE" | "CONNECT" | "UPDATE" | "DELETE"
selector?:

Selector is a label selector. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character). Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

roles?: [...string]

Roles is the list of namespaced role names for the user.

[...]: string
subjects?:
click to see definition
[...{
	// APIGroup holds the API group of the referenced subject.
	// Defaults to "" for ServiceAccount subjects.
	// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
	apiGroup?: string

	// Kind of object being referenced. Values defined by this API group are "User",
	// "Group", and "ServiceAccount".
	// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
	kind!: string

	// Name of the object being referenced.
	name!: string

	// Namespace of the referenced object. If the object kind is non-namespace, such
	// as "User" or "Group", and this value is not empty
	// the Authorizer should report an error.
	namespace?: string
}]

Subjects is the list of subject names like users, user groups, and service accounts.

[...]:
apiGroup?: string

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.

kind!: string

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.

name!: string

Name of the object being referenced.

namespace?: string

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.

schedule!: string ¶

The schedule in Cron format

status?: ¶

Status contains policy runtime data.

conditions?:
click to see definition
[...{
	// lastTransitionTime is the last time the condition transitioned from one status to another.
	// This should be when the underlying condition changed. If that is not known,
	// then using the time when the API field changed is acceptable.
	lastTransitionTime!: time.Time

	// message is a human readable message indicating details about the transition.
	// This may be an empty string.
	message!: strings.MaxRunes(
		32768,
	)

	// observedGeneration represents the .metadata.generation that the condition was set based upon.
	// For instance, if .metadata.generation is currently 12, but the
	// .status.conditions[x].observedGeneration is 9, the condition is out of date
	// with respect to the current state of the instance.
	observedGeneration?: int64 & int & >=0

	// reason contains a programmatic identifier indicating the reason for the
	// condition's last transition.
	// Producers of specific condition types may define expected values and meanings for this field,
	// and whether the values are considered a guaranteed API.
	// The value should be a CamelCase string.
	// This field may not be empty.
	reason!: strings.MaxRunes(
		1024,
	) &
		strings.MinRunes(
			1,
		) &
		=~"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"

	// status of the condition, one of True, False, Unknown.
	status!: "True" | "False" | "Unknown"

	// type of condition in CamelCase or in foo.example.com/CamelCase.
	type!: strings.MaxRunes(
		316,
	) &
		=~"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"
}]
¶
[...]:
lastTransitionTime!: time.Time

lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.

message!: strings.MaxRunes(32768)

message is a human readable message indicating details about the transition. This may be an empty string.

observedGeneration?: int64 & int & >=0

observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.

reason!: strings.MaxRunes(1024) & strings.MinRunes(1) & =~"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"

reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.

status!: "True" | "False" | "Unknown"

status of the condition, one of True, False, Unknown.

type!:
click to see definition
strings.MaxRunes(
	316,
) &
	=~"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"

type of condition in CamelCase or in foo.example.com/CamelCase.

lastExecutionTime?: time.Time ¶
#ClusterCleanupPolicy: ¶

ClusterCleanupPolicy defines rule for resource cleanup.

apiVersion:
click to see definition
string
& "kyverno.io/v2"
¶

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind:
click to see definition
string
& "ClusterCleanupPolicy"
¶

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata!: ¶
name!: string ¶
namespace?: string ¶
labels?: ¶
[string]: string ¶
annotations?: ¶
[string]: string ¶
spec!: ¶

Spec declares policy behaviors.

conditions?: ¶

Conditions defines the conditions used to select the resources which will be cleaned up.

all?:
click to see definition
[...{
	// Key is the context entry (using JMESPath) for conditional rule evaluation.
	key?: null | bool | number | string | [...] | {...}

	// Message is an optional display message
	message?: string

	// Operator is the conditional operation to perform. Valid operators are:
	// Equals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,
	// GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,
	// DurationLessThanOrEquals, DurationLessThan
	operator?: "Equals" |
		"NotEquals" |
		"AnyIn" |
		"AllIn" |
		"AnyNotIn" |
		"AllNotIn" |
		"GreaterThanOrEquals" |
		"GreaterThan" |
		"LessThanOrEquals" |
		"LessThan" |
		"DurationGreaterThanOrEquals" |
		"DurationGreaterThan" |
		"DurationLessThanOrEquals" |
		"DurationLessThan"

	// Value is the conditional value, or set of values. The values can be fixed set
	// or can be variables declared using JMESPath.
	value?: null | bool | number | string | [...] | {...}
}]
¶

AllConditions enable variable-based conditional rule execution. This is useful for finer control of when an rule is applied. A condition can reference object data using JMESPath notation. Here, all of the conditions need to pass.

[...]:
key?: null | bool | number | string | [...] | {...}

Key is the context entry (using JMESPath) for conditional rule evaluation.

message?: string

Message is an optional display message

operator?:
click to see definition
"Equals" |
	"NotEquals" |
	"AnyIn" |
	"AllIn" |
	"AnyNotIn" |
	"AllNotIn" |
	"GreaterThanOrEquals" |
	"GreaterThan" |
	"LessThanOrEquals" |
	"LessThan" |
	"DurationGreaterThanOrEquals" |
	"DurationGreaterThan" |
	"DurationLessThanOrEquals" |
	"DurationLessThan"

Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan, DurationLessThanOrEquals, DurationLessThan

value?: null | bool | number | string | [...] | {...}

Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using JMESPath.

any?:
click to see definition
[...{
	// Key is the context entry (using JMESPath) for conditional rule evaluation.
	key?: null | bool | number | string | [...] | {...}

	// Message is an optional display message
	message?: string

	// Operator is the conditional operation to perform. Valid operators are:
	// Equals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,
	// GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,
	// DurationLessThanOrEquals, DurationLessThan
	operator?: "Equals" |
		"NotEquals" |
		"AnyIn" |
		"AllIn" |
		"AnyNotIn" |
		"AllNotIn" |
		"GreaterThanOrEquals" |
		"GreaterThan" |
		"LessThanOrEquals" |
		"LessThan" |
		"DurationGreaterThanOrEquals" |
		"DurationGreaterThan" |
		"DurationLessThanOrEquals" |
		"DurationLessThan"

	// Value is the conditional value, or set of values. The values can be fixed set
	// or can be variables declared using JMESPath.
	value?: null | bool | number | string | [...] | {...}
}]
¶

AnyConditions enable variable-based conditional rule execution. This is useful for finer control of when an rule is applied. A condition can reference object data using JMESPath notation. Here, at least one of the conditions need to pass.

[...]:
key?: null | bool | number | string | [...] | {...}

Key is the context entry (using JMESPath) for conditional rule evaluation.

message?: string

Message is an optional display message

operator?:
click to see definition
"Equals" |
	"NotEquals" |
	"AnyIn" |
	"AllIn" |
	"AnyNotIn" |
	"AllNotIn" |
	"GreaterThanOrEquals" |
	"GreaterThan" |
	"LessThanOrEquals" |
	"LessThan" |
	"DurationGreaterThanOrEquals" |
	"DurationGreaterThan" |
	"DurationLessThanOrEquals" |
	"DurationLessThan"

Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan, DurationLessThanOrEquals, DurationLessThan

value?: null | bool | number | string | [...] | {...}

Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using JMESPath.

context?:
click to see definition
[...matchN(1, [
	{configMap!: _}, {apiCall!: _}, {imageRegistry!: _}, {variable!: _}, {globalReference!: _},
]) & {
	// APICall is an HTTP request to the Kubernetes API server, or other JSON web service.
	// The data returned is stored in the context with the name for the context entry.
	apiCall?: {
		// The data object specifies the POST data sent to the server.
		// Only applicable when the method field is set to POST.
		data?: [...{
			// Key is a unique identifier for the data value
			key!: string

			// Value is the data value
			value!: null | bool | number | string | [...] | {...}
		}]

		// Default is an optional arbitrary JSON object that the context
		// value is set to, if the apiCall returns error.
		default?: null | bool | number | string | [...] | {...}

		// JMESPath is an optional JSON Match Expression that can be used to
		// transform the JSON response returned from the server. For example
		// a JMESPath of "items | length(@)" applied to the API server response
		// for the URLPath "/apis/apps/v1/deployments" will return the total count
		// of deployments across all namespaces.
		jmesPath?: string

		// Method is the HTTP request type (GET or POST). Defaults to GET.
		method?: "GET" | "POST"

		// Service is an API call to a JSON web service.
		// This is used for non-Kubernetes API server calls.
		// It's mutually exclusive with the URLPath field.
		service?: {
			// CABundle is a PEM encoded CA bundle which will be used to validate
			// the server certificate.
			caBundle?: string

			// Headers is a list of optional HTTP headers to be included in the request.
			headers?: [...{
				// Key is the header key
				key!: string

				// Value is the header value
				value!: string
			}]

			// URL is the JSON web service URL. A typical form is
			// `https://{service}.{namespace}:{port}/{path}`.
			url!: string
		}

		// URLPath is the URL path to be used in the HTTP GET or POST request to the
		// Kubernetes API server (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments").
		// The format required is the same format used by the `kubectl get --raw` command.
		// See
		// https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls
		// for details.
		// It's mutually exclusive with the Service field.
		urlPath?: string
	}

	// ConfigMap is the ConfigMap reference.
	configMap?: {
		// Name is the ConfigMap name.
		name!: string

		// Namespace is the ConfigMap namespace.
		namespace?: string
	}

	// GlobalContextEntryReference is a reference to a cached global context entry.
	globalReference?: {
		// JMESPath is an optional JSON Match Expression that can be used to
		// transform the JSON response returned from the server. For example
		// a JMESPath of "items | length(@)" applied to the API server response
		// for the URLPath "/apis/apps/v1/deployments" will return the total count
		// of deployments across all namespaces.
		jmesPath?: string

		// Name of the global context entry
		name!: string
	}

	// ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image
	// details.
	imageRegistry?: {
		// ImageRegistryCredentials provides credentials that will be used for authentication with registry
		imageRegistryCredentials?: {
			// AllowInsecureRegistry allows insecure access to a registry.
			allowInsecureRegistry?: bool

			// Providers specifies a list of OCI Registry names, whose authentication providers are provided.
			// It can be of one of these values: default,google,azure,amazon,github.
			providers?: [..."default" | "amazon" | "azure" | "google" | "github"]

			// Secrets specifies a list of secrets that are provided for credentials.
			// Secrets can be specified as a name (Kyverno namespace) or namespace/name.
			// imagePullSecrets from the resource namespace are also used.
			secrets?: [...string]
		}

		// JMESPath is an optional JSON Match Expression that can be used to
		// transform the ImageData struct returned as a result of processing
		// the image reference.
		jmesPath?: string

		// Reference is image reference to a container image in the registry.
		// Example: ghcr.io/kyverno/kyverno:latest
		reference!: string
	}

	// Name is the variable name.
	name!: string

	// Variable defines an arbitrary JMESPath context variable that can be defined inline.
	variable?: {
		// Default is an optional arbitrary JSON object that the variable may take if the JMESPath
		// expression evaluates to nil
		default?: null | bool | number | string | [...] | {...}

		// JMESPath is an optional JMESPath Expression that can be used to
		// transform the variable.
		jmesPath?: string

		// Value is any arbitrary JSON object representable in YAML or JSON form.
		value?: null | bool | number | string | [...] | {...}
	}
}]
¶

Context defines variables and data sources that can be used during rule execution.

[...]:
click to see definition
matchN(1, [
	{configMap!: _}, {apiCall!: _}, {imageRegistry!: _}, {variable!: _}, {globalReference!: _},
]) & {
	// APICall is an HTTP request to the Kubernetes API server, or other JSON web service.
	// The data returned is stored in the context with the name for the context entry.
	apiCall?: {
		// The data object specifies the POST data sent to the server.
		// Only applicable when the method field is set to POST.
		data?: [...{
			// Key is a unique identifier for the data value
			key!: string

			// Value is the data value
			value!: null | bool | number | string | [...] | {...}
		}]

		// Default is an optional arbitrary JSON object that the context
		// value is set to, if the apiCall returns error.
		default?: null | bool | number | string | [...] | {...}

		// JMESPath is an optional JSON Match Expression that can be used to
		// transform the JSON response returned from the server. For example
		// a JMESPath of "items | length(@)" applied to the API server response
		// for the URLPath "/apis/apps/v1/deployments" will return the total count
		// of deployments across all namespaces.
		jmesPath?: string

		// Method is the HTTP request type (GET or POST). Defaults to GET.
		method?: "GET" | "POST"

		// Service is an API call to a JSON web service.
		// This is used for non-Kubernetes API server calls.
		// It's mutually exclusive with the URLPath field.
		service?: {
			// CABundle is a PEM encoded CA bundle which will be used to validate
			// the server certificate.
			caBundle?: string

			// Headers is a list of optional HTTP headers to be included in the request.
			headers?: [...{
				// Key is the header key
				key!: string

				// Value is the header value
				value!: string
			}]

			// URL is the JSON web service URL. A typical form is
			// `https://{service}.{namespace}:{port}/{path}`.
			url!: string
		}

		// URLPath is the URL path to be used in the HTTP GET or POST request to the
		// Kubernetes API server (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments").
		// The format required is the same format used by the `kubectl get --raw` command.
		// See
		// https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls
		// for details.
		// It's mutually exclusive with the Service field.
		urlPath?: string
	}

	// ConfigMap is the ConfigMap reference.
	configMap?: {
		// Name is the ConfigMap name.
		name!: string

		// Namespace is the ConfigMap namespace.
		namespace?: string
	}

	// GlobalContextEntryReference is a reference to a cached global context entry.
	globalReference?: {
		// JMESPath is an optional JSON Match Expression that can be used to
		// transform the JSON response returned from the server. For example
		// a JMESPath of "items | length(@)" applied to the API server response
		// for the URLPath "/apis/apps/v1/deployments" will return the total count
		// of deployments across all namespaces.
		jmesPath?: string

		// Name of the global context entry
		name!: string
	}

	// ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image
	// details.
	imageRegistry?: {
		// ImageRegistryCredentials provides credentials that will be used for authentication with registry
		imageRegistryCredentials?: {
			// AllowInsecureRegistry allows insecure access to a registry.
			allowInsecureRegistry?: bool

			// Providers specifies a list of OCI Registry names, whose authentication providers are provided.
			// It can be of one of these values: default,google,azure,amazon,github.
			providers?: [..."default" | "amazon" | "azure" | "google" | "github"]

			// Secrets specifies a list of secrets that are provided for credentials.
			// Secrets can be specified as a name (Kyverno namespace) or namespace/name.
			// imagePullSecrets from the resource namespace are also used.
			secrets?: [...string]
		}

		// JMESPath is an optional JSON Match Expression that can be used to
		// transform the ImageData struct returned as a result of processing
		// the image reference.
		jmesPath?: string

		// Reference is image reference to a container image in the registry.
		// Example: ghcr.io/kyverno/kyverno:latest
		reference!: string
	}

	// Name is the variable name.
	name!: string

	// Variable defines an arbitrary JMESPath context variable that can be defined inline.
	variable?: {
		// Default is an optional arbitrary JSON object that the variable may take if the JMESPath
		// expression evaluates to nil
		default?: null | bool | number | string | [...] | {...}

		// JMESPath is an optional JMESPath Expression that can be used to
		// transform the variable.
		jmesPath?: string

		// Value is any arbitrary JSON object representable in YAML or JSON form.
		value?: null | bool | number | string | [...] | {...}
	}
}
apiCall?:

APICall is an HTTP request to the Kubernetes API server, or other JSON web service. The data returned is stored in the context with the name for the context entry.

data?:
click to see definition
[...{
	// Key is a unique identifier for the data value
	key!: string

	// Value is the data value
	value!: null | bool | number | string | [...] | {...}
}]

The data object specifies the POST data sent to the server. Only applicable when the method field is set to POST.

[...]:
key!: string

Key is a unique identifier for the data value

value!: null | bool | number | string | [...] | {...}

Value is the data value

default?: null | bool | number | string | [...] | {...}

Default is an optional arbitrary JSON object that the context value is set to, if the apiCall returns error.

jmesPath?: string

JMESPath is an optional JSON Match Expression that can be used to transform the JSON response returned from the server. For example a JMESPath of "items | length(@)" applied to the API server response for the URLPath "/apis/apps/v1/deployments" will return the total count of deployments across all namespaces.

method?: "GET" | "POST"

Method is the HTTP request type (GET or POST). Defaults to GET.

service?:

Service is an API call to a JSON web service. This is used for non-Kubernetes API server calls. It's mutually exclusive with the URLPath field.

caBundle?: string

CABundle is a PEM encoded CA bundle which will be used to validate the server certificate.

headers?:
click to see definition
[...{
	// Key is the header key
	key!: string

	// Value is the header value
	value!: string
}]

Headers is a list of optional HTTP headers to be included in the request.

[...]:
click to see definition
{
	// Key is the header key
	key!: string

	// Value is the header value
	value!: string
}
url!: string

URL is the JSON web service URL. A typical form is `https://{service}.{namespace}:{port}/{path}`.

urlPath?: string

URLPath is the URL path to be used in the HTTP GET or POST request to the Kubernetes API server (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments"). The format required is the same format used by the `kubectl get --raw` command. See https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls for details. It's mutually exclusive with the Service field.

configMap?:

ConfigMap is the ConfigMap reference.

name!: string

Name is the ConfigMap name.

namespace?: string

Namespace is the ConfigMap namespace.

globalReference?:

GlobalContextEntryReference is a reference to a cached global context entry.

jmesPath?: string

JMESPath is an optional JSON Match Expression that can be used to transform the JSON response returned from the server. For example a JMESPath of "items | length(@)" applied to the API server response for the URLPath "/apis/apps/v1/deployments" will return the total count of deployments across all namespaces.

name!: string

Name of the global context entry

imageRegistry?:

ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image details.

imageRegistryCredentials?:

ImageRegistryCredentials provides credentials that will be used for authentication with registry

allowInsecureRegistry?: bool

AllowInsecureRegistry allows insecure access to a registry.

providers?: [..."default" | "amazon" | "azure" | "google" | "github"]

Providers specifies a list of OCI Registry names, whose authentication providers are provided. It can be of one of these values: default,google,azure,amazon,github.

[...]: "default" | "amazon" | "azure" | "google" | "github"
secrets?: [...string]

Secrets specifies a list of secrets that are provided for credentials. Secrets can be specified as a name (Kyverno namespace) or namespace/name. imagePullSecrets from the resource namespace are also used.

[...]: string
jmesPath?: string

JMESPath is an optional JSON Match Expression that can be used to transform the ImageData struct returned as a result of processing the image reference.

reference!: string

Reference is image reference to a container image in the registry. Example: ghcr.io/kyverno/kyverno:latest

name!: string

Name is the variable name.

variable?:

Variable defines an arbitrary JMESPath context variable that can be defined inline.

default?: null | bool | number | string | [...] | {...}

Default is an optional arbitrary JSON object that the variable may take if the JMESPath expression evaluates to nil

jmesPath?: string

JMESPath is an optional JMESPath Expression that can be used to transform the variable.

value?: null | bool | number | string | [...] | {...}

Value is any arbitrary JSON object representable in YAML or JSON form.

deletionPropagationPolicy?: "Foreground" | "Background" | "Orphan" ¶

DeletionPropagationPolicy defines how resources will be deleted (Foreground, Background, Orphan).

exclude?: ¶

ExcludeResources defines when cleanuppolicy should not be applied. The exclude criteria can include resource information (e.g. kind, name, namespace, labels) and admission review request information like the name or role.

all?:
click to see definition
[...{
	// ClusterRoles is the list of cluster-wide role names for the user.
	clusterRoles?: [...string]

	// ResourceDescription contains information about the resource being created or modified.
	resources?: matchN(0, [null | bool | number | string | [...] | {
		name!:  _
		names!: _
	}]) & {
		// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
		// and values support the wildcard characters "*" (matches zero or many characters) and
		// "?" (matches at least one character).
		annotations?: [string]: string

		// Kinds is a list of resource kinds.
		kinds?: [...string]

		// Name is the name of the resource. The name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		// NOTE: "Name" is being deprecated in favor of "Names".
		name?: string

		// Names are the names of the resources. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		names?: [...string]

		// NamespaceSelector is a label selector for the resource namespace. Label keys and values
		// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
		// and `?` (matches one character).Wildcards allows writing label selectors like
		// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
		// does not match an empty label set.
		namespaceSelector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}

		// Namespaces is a list of namespaces names. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		namespaces?: [...string]

		// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
		// are used to match a specific action.
		operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

		// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
		// characters `*` (matches zero or many characters) and `?` (matches one character).
		// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
		// using ["*" : "*"] matches any key and value but does not match an empty label set.
		selector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}
	}

	// Roles is the list of namespaced role names for the user.
	roles?: [...string]

	// Subjects is the list of subject names like users, user groups, and service accounts.
	subjects?: [...{
		// APIGroup holds the API group of the referenced subject.
		// Defaults to "" for ServiceAccount subjects.
		// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
		apiGroup?: string

		// Kind of object being referenced. Values defined by this API group are "User",
		// "Group", and "ServiceAccount".
		// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
		kind!: string

		// Name of the object being referenced.
		name!: string

		// Namespace of the referenced object. If the object kind is non-namespace, such
		// as "User" or "Group", and this value is not empty
		// the Authorizer should report an error.
		namespace?: string
	}]
}]
¶

All allows specifying resources which will be ANDed

[...]:
clusterRoles?: [...string]

ClusterRoles is the list of cluster-wide role names for the user.

[...]: string
resources?:
click to see definition
matchN(0, [null | bool | number | string | [...] | {
	name!:  _
	names!: _
}]) & {
	// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
	// and values support the wildcard characters "*" (matches zero or many characters) and
	// "?" (matches at least one character).
	annotations?: [string]: string

	// Kinds is a list of resource kinds.
	kinds?: [...string]

	// Name is the name of the resource. The name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	// NOTE: "Name" is being deprecated in favor of "Names".
	name?: string

	// Names are the names of the resources. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	names?: [...string]

	// NamespaceSelector is a label selector for the resource namespace. Label keys and values
	// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
	// and `?` (matches one character).Wildcards allows writing label selectors like
	// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
	// does not match an empty label set.
	namespaceSelector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}

	// Namespaces is a list of namespaces names. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	namespaces?: [...string]

	// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
	// are used to match a specific action.
	operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

	// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
	// characters `*` (matches zero or many characters) and `?` (matches one character).
	// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
	// using ["*" : "*"] matches any key and value but does not match an empty label set.
	selector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}
}

ResourceDescription contains information about the resource being created or modified.

annotations?:

Annotations is a map of annotations (key-value pairs of type string). Annotation keys and values support the wildcard characters "*" (matches zero or many characters) and "?" (matches at least one character).

[string]: string
kinds?: [...string]

Kinds is a list of resource kinds.

[...]: string
name?: string

Name is the name of the resource. The name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character). NOTE: "Name" is being deprecated in favor of "Names".

names?: [...string]

Names are the names of the resources. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
namespaceSelector?:

NamespaceSelector is a label selector for the resource namespace. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character).Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

namespaces?: [...string]

Namespaces is a list of namespaces names. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which are used to match a specific action.

[...]: "CREATE" | "CONNECT" | "UPDATE" | "DELETE"
selector?:

Selector is a label selector. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character). Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

roles?: [...string]

Roles is the list of namespaced role names for the user.

[...]: string
subjects?:
click to see definition
[...{
	// APIGroup holds the API group of the referenced subject.
	// Defaults to "" for ServiceAccount subjects.
	// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
	apiGroup?: string

	// Kind of object being referenced. Values defined by this API group are "User",
	// "Group", and "ServiceAccount".
	// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
	kind!: string

	// Name of the object being referenced.
	name!: string

	// Namespace of the referenced object. If the object kind is non-namespace, such
	// as "User" or "Group", and this value is not empty
	// the Authorizer should report an error.
	namespace?: string
}]

Subjects is the list of subject names like users, user groups, and service accounts.

[...]:
apiGroup?: string

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.

kind!: string

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.

name!: string

Name of the object being referenced.

namespace?: string

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.

any?:
click to see definition
[...{
	// ClusterRoles is the list of cluster-wide role names for the user.
	clusterRoles?: [...string]

	// ResourceDescription contains information about the resource being created or modified.
	resources?: matchN(0, [null | bool | number | string | [...] | {
		name!:  _
		names!: _
	}]) & {
		// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
		// and values support the wildcard characters "*" (matches zero or many characters) and
		// "?" (matches at least one character).
		annotations?: [string]: string

		// Kinds is a list of resource kinds.
		kinds?: [...string]

		// Name is the name of the resource. The name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		// NOTE: "Name" is being deprecated in favor of "Names".
		name?: string

		// Names are the names of the resources. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		names?: [...string]

		// NamespaceSelector is a label selector for the resource namespace. Label keys and values
		// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
		// and `?` (matches one character).Wildcards allows writing label selectors like
		// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
		// does not match an empty label set.
		namespaceSelector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}

		// Namespaces is a list of namespaces names. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		namespaces?: [...string]

		// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
		// are used to match a specific action.
		operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

		// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
		// characters `*` (matches zero or many characters) and `?` (matches one character).
		// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
		// using ["*" : "*"] matches any key and value but does not match an empty label set.
		selector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}
	}

	// Roles is the list of namespaced role names for the user.
	roles?: [...string]

	// Subjects is the list of subject names like users, user groups, and service accounts.
	subjects?: [...{
		// APIGroup holds the API group of the referenced subject.
		// Defaults to "" for ServiceAccount subjects.
		// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
		apiGroup?: string

		// Kind of object being referenced. Values defined by this API group are "User",
		// "Group", and "ServiceAccount".
		// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
		kind!: string

		// Name of the object being referenced.
		name!: string

		// Namespace of the referenced object. If the object kind is non-namespace, such
		// as "User" or "Group", and this value is not empty
		// the Authorizer should report an error.
		namespace?: string
	}]
}]
¶

Any allows specifying resources which will be ORed

[...]:
clusterRoles?: [...string]

ClusterRoles is the list of cluster-wide role names for the user.

[...]: string
resources?:
click to see definition
matchN(0, [null | bool | number | string | [...] | {
	name!:  _
	names!: _
}]) & {
	// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
	// and values support the wildcard characters "*" (matches zero or many characters) and
	// "?" (matches at least one character).
	annotations?: [string]: string

	// Kinds is a list of resource kinds.
	kinds?: [...string]

	// Name is the name of the resource. The name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	// NOTE: "Name" is being deprecated in favor of "Names".
	name?: string

	// Names are the names of the resources. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	names?: [...string]

	// NamespaceSelector is a label selector for the resource namespace. Label keys and values
	// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
	// and `?` (matches one character).Wildcards allows writing label selectors like
	// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
	// does not match an empty label set.
	namespaceSelector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}

	// Namespaces is a list of namespaces names. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	namespaces?: [...string]

	// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
	// are used to match a specific action.
	operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

	// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
	// characters `*` (matches zero or many characters) and `?` (matches one character).
	// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
	// using ["*" : "*"] matches any key and value but does not match an empty label set.
	selector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}
}

ResourceDescription contains information about the resource being created or modified.

annotations?:

Annotations is a map of annotations (key-value pairs of type string). Annotation keys and values support the wildcard characters "*" (matches zero or many characters) and "?" (matches at least one character).

[string]: string
kinds?: [...string]

Kinds is a list of resource kinds.

[...]: string
name?: string

Name is the name of the resource. The name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character). NOTE: "Name" is being deprecated in favor of "Names".

names?: [...string]

Names are the names of the resources. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
namespaceSelector?:

NamespaceSelector is a label selector for the resource namespace. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character).Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

namespaces?: [...string]

Namespaces is a list of namespaces names. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which are used to match a specific action.

[...]: "CREATE" | "CONNECT" | "UPDATE" | "DELETE"
selector?:

Selector is a label selector. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character). Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

roles?: [...string]

Roles is the list of namespaced role names for the user.

[...]: string
subjects?:
click to see definition
[...{
	// APIGroup holds the API group of the referenced subject.
	// Defaults to "" for ServiceAccount subjects.
	// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
	apiGroup?: string

	// Kind of object being referenced. Values defined by this API group are "User",
	// "Group", and "ServiceAccount".
	// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
	kind!: string

	// Name of the object being referenced.
	name!: string

	// Namespace of the referenced object. If the object kind is non-namespace, such
	// as "User" or "Group", and this value is not empty
	// the Authorizer should report an error.
	namespace?: string
}]

Subjects is the list of subject names like users, user groups, and service accounts.

[...]:
apiGroup?: string

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.

kind!: string

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.

name!: string

Name of the object being referenced.

namespace?: string

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.

match!: ¶

MatchResources defines when cleanuppolicy should be applied. The match criteria can include resource information (e.g. kind, name, namespace, labels) and admission review request information like the user name or role. At least one kind is required.

all?:
click to see definition
[...{
	// ClusterRoles is the list of cluster-wide role names for the user.
	clusterRoles?: [...string]

	// ResourceDescription contains information about the resource being created or modified.
	resources?: matchN(0, [null | bool | number | string | [...] | {
		name!:  _
		names!: _
	}]) & {
		// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
		// and values support the wildcard characters "*" (matches zero or many characters) and
		// "?" (matches at least one character).
		annotations?: [string]: string

		// Kinds is a list of resource kinds.
		kinds?: [...string]

		// Name is the name of the resource. The name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		// NOTE: "Name" is being deprecated in favor of "Names".
		name?: string

		// Names are the names of the resources. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		names?: [...string]

		// NamespaceSelector is a label selector for the resource namespace. Label keys and values
		// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
		// and `?` (matches one character).Wildcards allows writing label selectors like
		// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
		// does not match an empty label set.
		namespaceSelector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}

		// Namespaces is a list of namespaces names. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		namespaces?: [...string]

		// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
		// are used to match a specific action.
		operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

		// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
		// characters `*` (matches zero or many characters) and `?` (matches one character).
		// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
		// using ["*" : "*"] matches any key and value but does not match an empty label set.
		selector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}
	}

	// Roles is the list of namespaced role names for the user.
	roles?: [...string]

	// Subjects is the list of subject names like users, user groups, and service accounts.
	subjects?: [...{
		// APIGroup holds the API group of the referenced subject.
		// Defaults to "" for ServiceAccount subjects.
		// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
		apiGroup?: string

		// Kind of object being referenced. Values defined by this API group are "User",
		// "Group", and "ServiceAccount".
		// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
		kind!: string

		// Name of the object being referenced.
		name!: string

		// Namespace of the referenced object. If the object kind is non-namespace, such
		// as "User" or "Group", and this value is not empty
		// the Authorizer should report an error.
		namespace?: string
	}]
}]
¶

All allows specifying resources which will be ANDed

[...]:
clusterRoles?: [...string]

ClusterRoles is the list of cluster-wide role names for the user.

[...]: string
resources?:
click to see definition
matchN(0, [null | bool | number | string | [...] | {
	name!:  _
	names!: _
}]) & {
	// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
	// and values support the wildcard characters "*" (matches zero or many characters) and
	// "?" (matches at least one character).
	annotations?: [string]: string

	// Kinds is a list of resource kinds.
	kinds?: [...string]

	// Name is the name of the resource. The name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	// NOTE: "Name" is being deprecated in favor of "Names".
	name?: string

	// Names are the names of the resources. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	names?: [...string]

	// NamespaceSelector is a label selector for the resource namespace. Label keys and values
	// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
	// and `?` (matches one character).Wildcards allows writing label selectors like
	// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
	// does not match an empty label set.
	namespaceSelector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}

	// Namespaces is a list of namespaces names. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	namespaces?: [...string]

	// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
	// are used to match a specific action.
	operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

	// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
	// characters `*` (matches zero or many characters) and `?` (matches one character).
	// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
	// using ["*" : "*"] matches any key and value but does not match an empty label set.
	selector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}
}

ResourceDescription contains information about the resource being created or modified.

annotations?:

Annotations is a map of annotations (key-value pairs of type string). Annotation keys and values support the wildcard characters "*" (matches zero or many characters) and "?" (matches at least one character).

[string]: string
kinds?: [...string]

Kinds is a list of resource kinds.

[...]: string
name?: string

Name is the name of the resource. The name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character). NOTE: "Name" is being deprecated in favor of "Names".

names?: [...string]

Names are the names of the resources. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
namespaceSelector?:

NamespaceSelector is a label selector for the resource namespace. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character).Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

namespaces?: [...string]

Namespaces is a list of namespaces names. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which are used to match a specific action.

[...]: "CREATE" | "CONNECT" | "UPDATE" | "DELETE"
selector?:

Selector is a label selector. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character). Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

roles?: [...string]

Roles is the list of namespaced role names for the user.

[...]: string
subjects?:
click to see definition
[...{
	// APIGroup holds the API group of the referenced subject.
	// Defaults to "" for ServiceAccount subjects.
	// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
	apiGroup?: string

	// Kind of object being referenced. Values defined by this API group are "User",
	// "Group", and "ServiceAccount".
	// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
	kind!: string

	// Name of the object being referenced.
	name!: string

	// Namespace of the referenced object. If the object kind is non-namespace, such
	// as "User" or "Group", and this value is not empty
	// the Authorizer should report an error.
	namespace?: string
}]

Subjects is the list of subject names like users, user groups, and service accounts.

[...]:
apiGroup?: string

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.

kind!: string

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.

name!: string

Name of the object being referenced.

namespace?: string

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.

any?:
click to see definition
[...{
	// ClusterRoles is the list of cluster-wide role names for the user.
	clusterRoles?: [...string]

	// ResourceDescription contains information about the resource being created or modified.
	resources?: matchN(0, [null | bool | number | string | [...] | {
		name!:  _
		names!: _
	}]) & {
		// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
		// and values support the wildcard characters "*" (matches zero or many characters) and
		// "?" (matches at least one character).
		annotations?: [string]: string

		// Kinds is a list of resource kinds.
		kinds?: [...string]

		// Name is the name of the resource. The name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		// NOTE: "Name" is being deprecated in favor of "Names".
		name?: string

		// Names are the names of the resources. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		names?: [...string]

		// NamespaceSelector is a label selector for the resource namespace. Label keys and values
		// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
		// and `?` (matches one character).Wildcards allows writing label selectors like
		// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
		// does not match an empty label set.
		namespaceSelector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}

		// Namespaces is a list of namespaces names. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		namespaces?: [...string]

		// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
		// are used to match a specific action.
		operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

		// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
		// characters `*` (matches zero or many characters) and `?` (matches one character).
		// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
		// using ["*" : "*"] matches any key and value but does not match an empty label set.
		selector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}
	}

	// Roles is the list of namespaced role names for the user.
	roles?: [...string]

	// Subjects is the list of subject names like users, user groups, and service accounts.
	subjects?: [...{
		// APIGroup holds the API group of the referenced subject.
		// Defaults to "" for ServiceAccount subjects.
		// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
		apiGroup?: string

		// Kind of object being referenced. Values defined by this API group are "User",
		// "Group", and "ServiceAccount".
		// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
		kind!: string

		// Name of the object being referenced.
		name!: string

		// Namespace of the referenced object. If the object kind is non-namespace, such
		// as "User" or "Group", and this value is not empty
		// the Authorizer should report an error.
		namespace?: string
	}]
}]
¶

Any allows specifying resources which will be ORed

[...]:
clusterRoles?: [...string]

ClusterRoles is the list of cluster-wide role names for the user.

[...]: string
resources?:
click to see definition
matchN(0, [null | bool | number | string | [...] | {
	name!:  _
	names!: _
}]) & {
	// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
	// and values support the wildcard characters "*" (matches zero or many characters) and
	// "?" (matches at least one character).
	annotations?: [string]: string

	// Kinds is a list of resource kinds.
	kinds?: [...string]

	// Name is the name of the resource. The name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	// NOTE: "Name" is being deprecated in favor of "Names".
	name?: string

	// Names are the names of the resources. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	names?: [...string]

	// NamespaceSelector is a label selector for the resource namespace. Label keys and values
	// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
	// and `?` (matches one character).Wildcards allows writing label selectors like
	// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
	// does not match an empty label set.
	namespaceSelector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}

	// Namespaces is a list of namespaces names. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	namespaces?: [...string]

	// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
	// are used to match a specific action.
	operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

	// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
	// characters `*` (matches zero or many characters) and `?` (matches one character).
	// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
	// using ["*" : "*"] matches any key and value but does not match an empty label set.
	selector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}
}

ResourceDescription contains information about the resource being created or modified.

annotations?:

Annotations is a map of annotations (key-value pairs of type string). Annotation keys and values support the wildcard characters "*" (matches zero or many characters) and "?" (matches at least one character).

[string]: string
kinds?: [...string]

Kinds is a list of resource kinds.

[...]: string
name?: string

Name is the name of the resource. The name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character). NOTE: "Name" is being deprecated in favor of "Names".

names?: [...string]

Names are the names of the resources. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
namespaceSelector?:

NamespaceSelector is a label selector for the resource namespace. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character).Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

namespaces?: [...string]

Namespaces is a list of namespaces names. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which are used to match a specific action.

[...]: "CREATE" | "CONNECT" | "UPDATE" | "DELETE"
selector?:

Selector is a label selector. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character). Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

roles?: [...string]

Roles is the list of namespaced role names for the user.

[...]: string
subjects?:
click to see definition
[...{
	// APIGroup holds the API group of the referenced subject.
	// Defaults to "" for ServiceAccount subjects.
	// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
	apiGroup?: string

	// Kind of object being referenced. Values defined by this API group are "User",
	// "Group", and "ServiceAccount".
	// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
	kind!: string

	// Name of the object being referenced.
	name!: string

	// Namespace of the referenced object. If the object kind is non-namespace, such
	// as "User" or "Group", and this value is not empty
	// the Authorizer should report an error.
	namespace?: string
}]

Subjects is the list of subject names like users, user groups, and service accounts.

[...]:
apiGroup?: string

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.

kind!: string

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.

name!: string

Name of the object being referenced.

namespace?: string

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.

schedule!: string ¶

The schedule in Cron format

status?: ¶

Status contains policy runtime data.

conditions?:
click to see definition
[...{
	// lastTransitionTime is the last time the condition transitioned from one status to another.
	// This should be when the underlying condition changed. If that is not known,
	// then using the time when the API field changed is acceptable.
	lastTransitionTime!: time.Time

	// message is a human readable message indicating details about the transition.
	// This may be an empty string.
	message!: strings.MaxRunes(
		32768,
	)

	// observedGeneration represents the .metadata.generation that the condition was set based upon.
	// For instance, if .metadata.generation is currently 12, but the
	// .status.conditions[x].observedGeneration is 9, the condition is out of date
	// with respect to the current state of the instance.
	observedGeneration?: int64 & int & >=0

	// reason contains a programmatic identifier indicating the reason for the
	// condition's last transition.
	// Producers of specific condition types may define expected values and meanings for this field,
	// and whether the values are considered a guaranteed API.
	// The value should be a CamelCase string.
	// This field may not be empty.
	reason!: strings.MaxRunes(
		1024,
	) &
		strings.MinRunes(
			1,
		) &
		=~"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"

	// status of the condition, one of True, False, Unknown.
	status!: "True" | "False" | "Unknown"

	// type of condition in CamelCase or in foo.example.com/CamelCase.
	type!: strings.MaxRunes(
		316,
	) &
		=~"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"
}]
¶
[...]:
lastTransitionTime!: time.Time

lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.

message!: strings.MaxRunes(32768)

message is a human readable message indicating details about the transition. This may be an empty string.

observedGeneration?: int64 & int & >=0

observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.

reason!: strings.MaxRunes(1024) & strings.MinRunes(1) & =~"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"

reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.

status!: "True" | "False" | "Unknown"

status of the condition, one of True, False, Unknown.

type!:
click to see definition
strings.MaxRunes(
	316,
) &
	=~"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"

type of condition in CamelCase or in foo.example.com/CamelCase.

lastExecutionTime?: time.Time ¶
#GlobalContextEntry: ¶

GlobalContextEntry declares resources to be cached.

apiVersion:
click to see definition
string
& "kyverno.io/v2"
¶

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind:
click to see definition
string
& "GlobalContextEntry"
¶

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata!: ¶
name!: string ¶
namespace?: string ¶
labels?: ¶
[string]: string ¶
annotations?: ¶
[string]: string ¶
spec!:
click to see definition
matchN(1, [{kubernetesResource!: _}, {apiCall!: _}]) & {
	// Stores results from an API call which will be cached.
	// Mutually exclusive with KubernetesResource.
	// This can be used to make calls to external (non-Kubernetes API server) services.
	// It can also be used to make calls to the Kubernetes API server in such cases:
	// 1. A POST is needed to create a resource.
	// 2. Finer-grained control is needed. Example: To restrict the number of resources cached.
	apiCall?: {
		// The data object specifies the POST data sent to the server.
		// Only applicable when the method field is set to POST.
		data?: [...{
			// Key is a unique identifier for the data value
			key!: string

			// Value is the data value
			value!: null | bool | number | string | [...] | {...}
		}]

		// Method is the HTTP request type (GET or POST). Defaults to GET.
		method?: "GET" | "POST"

		// RefreshInterval defines the interval in duration at which to poll the APICall.
		// The duration is a sequence of decimal numbers, each with optional fraction and a unit suffix,
		// such as "300ms", "1.5h" or "2h45m". Valid time units are "ns", "us" (or
		// "µs"), "ms", "s", "m", "h".
		refreshInterval?: string

		// RetryLimit defines the number of times the APICall should be retried in case of failure.
		retryLimit?: int & >=1

		// Service is an API call to a JSON web service.
		// This is used for non-Kubernetes API server calls.
		// It's mutually exclusive with the URLPath field.
		service?: {
			// CABundle is a PEM encoded CA bundle which will be used to validate
			// the server certificate.
			caBundle?: string

			// Headers is a list of optional HTTP headers to be included in the request.
			headers?: [...{
				// Key is the header key
				key!: string

				// Value is the header value
				value!: string
			}]

			// URL is the JSON web service URL. A typical form is
			// `https://{service}.{namespace}:{port}/{path}`.
			url!: string
		}

		// URLPath is the URL path to be used in the HTTP GET or POST request to the
		// Kubernetes API server (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments").
		// The format required is the same format used by the `kubectl get --raw` command.
		// See
		// https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls
		// for details.
		// It's mutually exclusive with the Service field.
		urlPath?: string
	}

	// Stores a list of Kubernetes resources which will be cached.
	// Mutually exclusive with APICall.
	kubernetesResource?: {
		// Group defines the group of the resource.
		group?: string

		// Namespace defines the namespace of the resource. Leave empty for cluster scoped resources.
		// If left empty for namespaced resources, all resources from all namespaces will be cached.
		namespace?: string

		// Resource defines the type of the resource.
		// Requires the pluralized form of the resource kind in lowercase. (Ex., "deployments")
		resource!: string

		// Version defines the version of the resource.
		version!: string
	}

	// Projections defines the list of JMESPath expressions to extract values from the cached resource.
	projections?: [...{
		// JMESPath is the JMESPath expression to extract the value from the cached resource.
		jmesPath!: string

		// Name is the name to use for the extracted value in the context.
		name!: string
	}]
}
¶

Spec declares policy exception behaviors.

apiCall?: ¶

Stores results from an API call which will be cached. Mutually exclusive with KubernetesResource. This can be used to make calls to external (non-Kubernetes API server) services. It can also be used to make calls to the Kubernetes API server in such cases: 1. A POST is needed to create a resource. 2. Finer-grained control is needed. Example: To restrict the number of resources cached.

data?:
click to see definition
[...{
	// Key is a unique identifier for the data value
	key!: string

	// Value is the data value
	value!: null | bool | number | string | [...] | {...}
}]
¶

The data object specifies the POST data sent to the server. Only applicable when the method field is set to POST.

[...]:
key!: string

Key is a unique identifier for the data value

value!: null | bool | number | string | [...] | {...}

Value is the data value

method?: "GET" | "POST" ¶

Method is the HTTP request type (GET or POST). Defaults to GET.

refreshInterval?: string ¶

RefreshInterval defines the interval in duration at which to poll the APICall. The duration is a sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

retryLimit?: int & >=1 ¶

RetryLimit defines the number of times the APICall should be retried in case of failure.

service?: ¶

Service is an API call to a JSON web service. This is used for non-Kubernetes API server calls. It's mutually exclusive with the URLPath field.

caBundle?: string ¶

CABundle is a PEM encoded CA bundle which will be used to validate the server certificate.

headers?:
click to see definition
[...{
	// Key is the header key
	key!: string

	// Value is the header value
	value!: string
}]
¶

Headers is a list of optional HTTP headers to be included in the request.

[...]:
key!: string

Key is the header key

value!: string

Value is the header value

url!: string ¶

URL is the JSON web service URL. A typical form is `https://{service}.{namespace}:{port}/{path}`.

urlPath?: string ¶

URLPath is the URL path to be used in the HTTP GET or POST request to the Kubernetes API server (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments"). The format required is the same format used by the `kubectl get --raw` command. See https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls for details. It's mutually exclusive with the Service field.

kubernetesResource?: ¶

Stores a list of Kubernetes resources which will be cached. Mutually exclusive with APICall.

group?: string ¶

Group defines the group of the resource.

namespace?: string ¶

Namespace defines the namespace of the resource. Leave empty for cluster scoped resources. If left empty for namespaced resources, all resources from all namespaces will be cached.

resource!: string ¶

Resource defines the type of the resource. Requires the pluralized form of the resource kind in lowercase. (Ex., "deployments")

version!: string ¶

Version defines the version of the resource.

projections?:
click to see definition
[...{
	// JMESPath is the JMESPath expression to extract the value from the cached resource.
	jmesPath!: string

	// Name is the name to use for the extracted value in the context.
	name!: string
}]
¶

Projections defines the list of JMESPath expressions to extract values from the cached resource.

[...]:
jmesPath!: string

JMESPath is the JMESPath expression to extract the value from the cached resource.

name!: string

Name is the name to use for the extracted value in the context.

status?: ¶

Status contains globalcontextentry runtime data.

conditions?:
click to see definition
[...{
	// lastTransitionTime is the last time the condition transitioned from one status to another.
	// This should be when the underlying condition changed. If that is not known,
	// then using the time when the API field changed is acceptable.
	lastTransitionTime!: time.Time

	// message is a human readable message indicating details about the transition.
	// This may be an empty string.
	message!: strings.MaxRunes(
		32768,
	)

	// observedGeneration represents the .metadata.generation that the condition was set based upon.
	// For instance, if .metadata.generation is currently 12, but the
	// .status.conditions[x].observedGeneration is 9, the condition is out of date
	// with respect to the current state of the instance.
	observedGeneration?: int64 & int & >=0

	// reason contains a programmatic identifier indicating the reason for the
	// condition's last transition.
	// Producers of specific condition types may define expected values and meanings for this field,
	// and whether the values are considered a guaranteed API.
	// The value should be a CamelCase string.
	// This field may not be empty.
	reason!: strings.MaxRunes(
		1024,
	) &
		strings.MinRunes(
			1,
		) &
		=~"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"

	// status of the condition, one of True, False, Unknown.
	status!: "True" | "False" | "Unknown"

	// type of condition in CamelCase or in foo.example.com/CamelCase.
	type!: strings.MaxRunes(
		316,
	) &
		=~"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"
}]
¶
[...]:
lastTransitionTime!: time.Time

lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.

message!: strings.MaxRunes(32768)

message is a human readable message indicating details about the transition. This may be an empty string.

observedGeneration?: int64 & int & >=0

observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.

reason!: strings.MaxRunes(1024) & strings.MinRunes(1) & =~"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"

reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.

status!: "True" | "False" | "Unknown"

status of the condition, one of True, False, Unknown.

type!:
click to see definition
strings.MaxRunes(
	316,
) &
	=~"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"

type of condition in CamelCase or in foo.example.com/CamelCase.

lastRefreshTime?: time.Time ¶

Indicates the time when the globalcontextentry was last refreshed successfully for the API Call

#PolicyException: ¶

PolicyException declares resources to be excluded from specified policies.

apiVersion:
click to see definition
string
& "kyverno.io/v2"
¶

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind:
click to see definition
string
& "PolicyException"
¶

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata!: ¶
name!: string ¶
namespace!: string ¶
labels?: ¶
[string]: string ¶
annotations?: ¶
[string]: string ¶
spec!: ¶

Spec declares policy exception behaviors.

background?: bool ¶

Background controls if exceptions are applied to existing policies during a background scan. Optional. Default value is "true". The value must be set to "false" if the policy rule uses variables that are only available in the admission review request (e.g. user name).

conditions?: ¶

Conditions are used to determine if a resource applies to the exception by evaluating a set of conditions. The declaration can contain nested `any` or `all` statements.

all?:
click to see definition
[...{
	// Key is the context entry (using JMESPath) for conditional rule evaluation.
	key?: null | bool | number | string | [...] | {...}

	// Message is an optional display message
	message?: string

	// Operator is the conditional operation to perform. Valid operators are:
	// Equals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,
	// GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,
	// DurationLessThanOrEquals, DurationLessThan
	operator?: "Equals" |
		"NotEquals" |
		"AnyIn" |
		"AllIn" |
		"AnyNotIn" |
		"AllNotIn" |
		"GreaterThanOrEquals" |
		"GreaterThan" |
		"LessThanOrEquals" |
		"LessThan" |
		"DurationGreaterThanOrEquals" |
		"DurationGreaterThan" |
		"DurationLessThanOrEquals" |
		"DurationLessThan"

	// Value is the conditional value, or set of values. The values can be fixed set
	// or can be variables declared using JMESPath.
	value?: null | bool | number | string | [...] | {...}
}]
¶

AllConditions enable variable-based conditional rule execution. This is useful for finer control of when an rule is applied. A condition can reference object data using JMESPath notation. Here, all of the conditions need to pass.

[...]:
key?: null | bool | number | string | [...] | {...}

Key is the context entry (using JMESPath) for conditional rule evaluation.

message?: string

Message is an optional display message

operator?:
click to see definition
"Equals" |
	"NotEquals" |
	"AnyIn" |
	"AllIn" |
	"AnyNotIn" |
	"AllNotIn" |
	"GreaterThanOrEquals" |
	"GreaterThan" |
	"LessThanOrEquals" |
	"LessThan" |
	"DurationGreaterThanOrEquals" |
	"DurationGreaterThan" |
	"DurationLessThanOrEquals" |
	"DurationLessThan"

Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan, DurationLessThanOrEquals, DurationLessThan

value?: null | bool | number | string | [...] | {...}

Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using JMESPath.

any?:
click to see definition
[...{
	// Key is the context entry (using JMESPath) for conditional rule evaluation.
	key?: null | bool | number | string | [...] | {...}

	// Message is an optional display message
	message?: string

	// Operator is the conditional operation to perform. Valid operators are:
	// Equals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,
	// GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,
	// DurationLessThanOrEquals, DurationLessThan
	operator?: "Equals" |
		"NotEquals" |
		"AnyIn" |
		"AllIn" |
		"AnyNotIn" |
		"AllNotIn" |
		"GreaterThanOrEquals" |
		"GreaterThan" |
		"LessThanOrEquals" |
		"LessThan" |
		"DurationGreaterThanOrEquals" |
		"DurationGreaterThan" |
		"DurationLessThanOrEquals" |
		"DurationLessThan"

	// Value is the conditional value, or set of values. The values can be fixed set
	// or can be variables declared using JMESPath.
	value?: null | bool | number | string | [...] | {...}
}]
¶

AnyConditions enable variable-based conditional rule execution. This is useful for finer control of when an rule is applied. A condition can reference object data using JMESPath notation. Here, at least one of the conditions need to pass.

[...]:
key?: null | bool | number | string | [...] | {...}

Key is the context entry (using JMESPath) for conditional rule evaluation.

message?: string

Message is an optional display message

operator?:
click to see definition
"Equals" |
	"NotEquals" |
	"AnyIn" |
	"AllIn" |
	"AnyNotIn" |
	"AllNotIn" |
	"GreaterThanOrEquals" |
	"GreaterThan" |
	"LessThanOrEquals" |
	"LessThan" |
	"DurationGreaterThanOrEquals" |
	"DurationGreaterThan" |
	"DurationLessThanOrEquals" |
	"DurationLessThan"

Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan, DurationLessThanOrEquals, DurationLessThan

value?: null | bool | number | string | [...] | {...}

Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using JMESPath.

exceptions!:
click to see definition
[...{
	// PolicyName identifies the policy to which the exception is applied.
	// The policy name uses the format <namespace>/<name> unless it
	// references a ClusterPolicy.
	policyName!: string

	// RuleNames identifies the rules to which the exception is applied.
	ruleNames!: [...string]
}]
¶

Exceptions is a list policy/rules to be excluded

[...]:
policyName!: string

PolicyName identifies the policy to which the exception is applied. The policy name uses the format <namespace>/<name> unless it references a ClusterPolicy.

ruleNames!: [...string]

RuleNames identifies the rules to which the exception is applied.

[...]: string
match!: ¶

Match defines match clause used to check if a resource applies to the exception

all?:
click to see definition
[...{
	// ClusterRoles is the list of cluster-wide role names for the user.
	clusterRoles?: [...string]

	// ResourceDescription contains information about the resource being created or modified.
	resources?: matchN(0, [null | bool | number | string | [...] | {
		name!:  _
		names!: _
	}]) & {
		// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
		// and values support the wildcard characters "*" (matches zero or many characters) and
		// "?" (matches at least one character).
		annotations?: [string]: string

		// Kinds is a list of resource kinds.
		kinds?: [...string]

		// Name is the name of the resource. The name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		// NOTE: "Name" is being deprecated in favor of "Names".
		name?: string

		// Names are the names of the resources. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		names?: [...string]

		// NamespaceSelector is a label selector for the resource namespace. Label keys and values
		// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
		// and `?` (matches one character).Wildcards allows writing label selectors like
		// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
		// does not match an empty label set.
		namespaceSelector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}

		// Namespaces is a list of namespaces names. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		namespaces?: [...string]

		// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
		// are used to match a specific action.
		operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

		// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
		// characters `*` (matches zero or many characters) and `?` (matches one character).
		// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
		// using ["*" : "*"] matches any key and value but does not match an empty label set.
		selector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}
	}

	// Roles is the list of namespaced role names for the user.
	roles?: [...string]

	// Subjects is the list of subject names like users, user groups, and service accounts.
	subjects?: [...{
		// APIGroup holds the API group of the referenced subject.
		// Defaults to "" for ServiceAccount subjects.
		// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
		apiGroup?: string

		// Kind of object being referenced. Values defined by this API group are "User",
		// "Group", and "ServiceAccount".
		// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
		kind!: string

		// Name of the object being referenced.
		name!: string

		// Namespace of the referenced object. If the object kind is non-namespace, such
		// as "User" or "Group", and this value is not empty
		// the Authorizer should report an error.
		namespace?: string
	}]
}]
¶

All allows specifying resources which will be ANDed

[...]:
clusterRoles?: [...string]

ClusterRoles is the list of cluster-wide role names for the user.

[...]: string
resources?:
click to see definition
matchN(0, [null | bool | number | string | [...] | {
	name!:  _
	names!: _
}]) & {
	// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
	// and values support the wildcard characters "*" (matches zero or many characters) and
	// "?" (matches at least one character).
	annotations?: [string]: string

	// Kinds is a list of resource kinds.
	kinds?: [...string]

	// Name is the name of the resource. The name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	// NOTE: "Name" is being deprecated in favor of "Names".
	name?: string

	// Names are the names of the resources. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	names?: [...string]

	// NamespaceSelector is a label selector for the resource namespace. Label keys and values
	// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
	// and `?` (matches one character).Wildcards allows writing label selectors like
	// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
	// does not match an empty label set.
	namespaceSelector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}

	// Namespaces is a list of namespaces names. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	namespaces?: [...string]

	// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
	// are used to match a specific action.
	operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

	// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
	// characters `*` (matches zero or many characters) and `?` (matches one character).
	// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
	// using ["*" : "*"] matches any key and value but does not match an empty label set.
	selector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}
}

ResourceDescription contains information about the resource being created or modified.

annotations?:

Annotations is a map of annotations (key-value pairs of type string). Annotation keys and values support the wildcard characters "*" (matches zero or many characters) and "?" (matches at least one character).

[string]: string
kinds?: [...string]

Kinds is a list of resource kinds.

[...]: string
name?: string

Name is the name of the resource. The name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character). NOTE: "Name" is being deprecated in favor of "Names".

names?: [...string]

Names are the names of the resources. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
namespaceSelector?:

NamespaceSelector is a label selector for the resource namespace. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character).Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

namespaces?: [...string]

Namespaces is a list of namespaces names. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which are used to match a specific action.

[...]: "CREATE" | "CONNECT" | "UPDATE" | "DELETE"
selector?:

Selector is a label selector. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character). Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

roles?: [...string]

Roles is the list of namespaced role names for the user.

[...]: string
subjects?:
click to see definition
[...{
	// APIGroup holds the API group of the referenced subject.
	// Defaults to "" for ServiceAccount subjects.
	// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
	apiGroup?: string

	// Kind of object being referenced. Values defined by this API group are "User",
	// "Group", and "ServiceAccount".
	// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
	kind!: string

	// Name of the object being referenced.
	name!: string

	// Namespace of the referenced object. If the object kind is non-namespace, such
	// as "User" or "Group", and this value is not empty
	// the Authorizer should report an error.
	namespace?: string
}]

Subjects is the list of subject names like users, user groups, and service accounts.

[...]:
apiGroup?: string

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.

kind!: string

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.

name!: string

Name of the object being referenced.

namespace?: string

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.

any?:
click to see definition
[...{
	// ClusterRoles is the list of cluster-wide role names for the user.
	clusterRoles?: [...string]

	// ResourceDescription contains information about the resource being created or modified.
	resources?: matchN(0, [null | bool | number | string | [...] | {
		name!:  _
		names!: _
	}]) & {
		// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
		// and values support the wildcard characters "*" (matches zero or many characters) and
		// "?" (matches at least one character).
		annotations?: [string]: string

		// Kinds is a list of resource kinds.
		kinds?: [...string]

		// Name is the name of the resource. The name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		// NOTE: "Name" is being deprecated in favor of "Names".
		name?: string

		// Names are the names of the resources. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		names?: [...string]

		// NamespaceSelector is a label selector for the resource namespace. Label keys and values
		// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
		// and `?` (matches one character).Wildcards allows writing label selectors like
		// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
		// does not match an empty label set.
		namespaceSelector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}

		// Namespaces is a list of namespaces names. Each name supports wildcard characters
		// "*" (matches zero or many characters) and "?" (at least one character).
		namespaces?: [...string]

		// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
		// are used to match a specific action.
		operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

		// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
		// characters `*` (matches zero or many characters) and `?` (matches one character).
		// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
		// using ["*" : "*"] matches any key and value but does not match an empty label set.
		selector?: {
			// matchExpressions is a list of label selector requirements. The requirements are ANDed.
			matchExpressions?: [...{
				// key is the label key that the selector applies to.
				key!: string

				// operator represents a key's relationship to a set of values.
				// Valid operators are In, NotIn, Exists and DoesNotExist.
				operator!: string

				// values is an array of string values. If the operator is In or NotIn,
				// the values array must be non-empty. If the operator is Exists or DoesNotExist,
				// the values array must be empty. This array is replaced during a strategic
				// merge patch.
				values?: [...string]
			}]

			// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
			// map is equivalent to an element of matchExpressions, whose key field is "key", the
			// operator is "In", and the values array contains only "value". The requirements are ANDed.
			matchLabels?: [string]: string
		}
	}

	// Roles is the list of namespaced role names for the user.
	roles?: [...string]

	// Subjects is the list of subject names like users, user groups, and service accounts.
	subjects?: [...{
		// APIGroup holds the API group of the referenced subject.
		// Defaults to "" for ServiceAccount subjects.
		// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
		apiGroup?: string

		// Kind of object being referenced. Values defined by this API group are "User",
		// "Group", and "ServiceAccount".
		// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
		kind!: string

		// Name of the object being referenced.
		name!: string

		// Namespace of the referenced object. If the object kind is non-namespace, such
		// as "User" or "Group", and this value is not empty
		// the Authorizer should report an error.
		namespace?: string
	}]
}]
¶

Any allows specifying resources which will be ORed

[...]:
clusterRoles?: [...string]

ClusterRoles is the list of cluster-wide role names for the user.

[...]: string
resources?:
click to see definition
matchN(0, [null | bool | number | string | [...] | {
	name!:  _
	names!: _
}]) & {
	// Annotations is a map of annotations (key-value pairs of type string). Annotation keys
	// and values support the wildcard characters "*" (matches zero or many characters) and
	// "?" (matches at least one character).
	annotations?: [string]: string

	// Kinds is a list of resource kinds.
	kinds?: [...string]

	// Name is the name of the resource. The name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	// NOTE: "Name" is being deprecated in favor of "Names".
	name?: string

	// Names are the names of the resources. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	names?: [...string]

	// NamespaceSelector is a label selector for the resource namespace. Label keys and values
	// in `matchLabels` support the wildcard characters `*` (matches zero or many characters)
	// and `?` (matches one character).Wildcards allows writing label selectors like
	// ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but
	// does not match an empty label set.
	namespaceSelector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}

	// Namespaces is a list of namespaces names. Each name supports wildcard characters
	// "*" (matches zero or many characters) and "?" (at least one character).
	namespaces?: [...string]

	// Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which
	// are used to match a specific action.
	operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

	// Selector is a label selector. Label keys and values in `matchLabels` support the wildcard
	// characters `*` (matches zero or many characters) and `?` (matches one character).
	// Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that
	// using ["*" : "*"] matches any key and value but does not match an empty label set.
	selector?: {
		// matchExpressions is a list of label selector requirements. The requirements are ANDed.
		matchExpressions?: [...{
			// key is the label key that the selector applies to.
			key!: string

			// operator represents a key's relationship to a set of values.
			// Valid operators are In, NotIn, Exists and DoesNotExist.
			operator!: string

			// values is an array of string values. If the operator is In or NotIn,
			// the values array must be non-empty. If the operator is Exists or DoesNotExist,
			// the values array must be empty. This array is replaced during a strategic
			// merge patch.
			values?: [...string]
		}]

		// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
		// map is equivalent to an element of matchExpressions, whose key field is "key", the
		// operator is "In", and the values array contains only "value". The requirements are ANDed.
		matchLabels?: [string]: string
	}
}

ResourceDescription contains information about the resource being created or modified.

annotations?:

Annotations is a map of annotations (key-value pairs of type string). Annotation keys and values support the wildcard characters "*" (matches zero or many characters) and "?" (matches at least one character).

[string]: string
kinds?: [...string]

Kinds is a list of resource kinds.

[...]: string
name?: string

Name is the name of the resource. The name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character). NOTE: "Name" is being deprecated in favor of "Names".

names?: [...string]

Names are the names of the resources. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
namespaceSelector?:

NamespaceSelector is a label selector for the resource namespace. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character).Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

namespaces?: [...string]

Namespaces is a list of namespaces names. Each name supports wildcard characters "*" (matches zero or many characters) and "?" (at least one character).

[...]: string
operations?: [..."CREATE" | "CONNECT" | "UPDATE" | "DELETE"]

Operations can contain values ["CREATE, "UPDATE", "CONNECT", "DELETE"], which are used to match a specific action.

[...]: "CREATE" | "CONNECT" | "UPDATE" | "DELETE"
selector?:

Selector is a label selector. Label keys and values in `matchLabels` support the wildcard characters `*` (matches zero or many characters) and `?` (matches one character). Wildcards allows writing label selectors like ["storage.k8s.io/*": "*"]. Note that using ["*" : "*"] matches any key and value but does not match an empty label set.

matchExpressions?:
click to see definition
[...{
	// key is the label key that the selector applies to.
	key!: string

	// operator represents a key's relationship to a set of values.
	// Valid operators are In, NotIn, Exists and DoesNotExist.
	operator!: string

	// values is an array of string values. If the operator is In or NotIn,
	// the values array must be non-empty. If the operator is Exists or DoesNotExist,
	// the values array must be empty. This array is replaced during a strategic
	// merge patch.
	values?: [...string]
}]

matchExpressions is a list of label selector requirements. The requirements are ANDed.

matchLabels?: {[string]: string}

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

roles?: [...string]

Roles is the list of namespaced role names for the user.

[...]: string
subjects?:
click to see definition
[...{
	// APIGroup holds the API group of the referenced subject.
	// Defaults to "" for ServiceAccount subjects.
	// Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
	apiGroup?: string

	// Kind of object being referenced. Values defined by this API group are "User",
	// "Group", and "ServiceAccount".
	// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
	kind!: string

	// Name of the object being referenced.
	name!: string

	// Namespace of the referenced object. If the object kind is non-namespace, such
	// as "User" or "Group", and this value is not empty
	// the Authorizer should report an error.
	namespace?: string
}]

Subjects is the list of subject names like users, user groups, and service accounts.

[...]:
apiGroup?: string

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.

kind!: string

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.

name!: string

Name of the object being referenced.

namespace?: string

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.

podSecurity?:
click to see definition
[...{
	// ControlName specifies the name of the Pod Security Standard control.
	// See: https://kubernetes.io/docs/concepts/security/pod-security-standards/
	controlName!: "HostProcess" |
		"Host Namespaces" |
		"Privileged Containers" |
		"Capabilities" |
		"HostPath Volumes" |
		"Host Ports" |
		"AppArmor" |
		"SELinux" |
		"/proc Mount Type" |
		"Seccomp" |
		"Sysctls" |
		"Volume Types" |
		"Privilege Escalation" |
		"Running as Non-root" |
		"Running as Non-root user"

	// Images selects matching containers and applies the container level PSS.
	// Each image is the image name consisting of the registry address, repository, image, and tag.
	// Empty list matches no containers, PSS checks are applied at the pod level only.
	// Wildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.
	images?: [...string]

	// RestrictedField selects the field for the given Pod Security Standard control.
	// When not set, all restricted fields for the control are selected.
	restrictedField?: string

	// Values defines the allowed values that can be excluded.
	values?: [...string]
}]
¶

PodSecurity specifies the Pod Security Standard controls to be excluded. Applicable only to policies that have validate.podSecurity subrule.

[...]:
controlName!:
click to see definition
"HostProcess" |
	"Host Namespaces" |
	"Privileged Containers" |
	"Capabilities" |
	"HostPath Volumes" |
	"Host Ports" |
	"AppArmor" |
	"SELinux" |
	"/proc Mount Type" |
	"Seccomp" |
	"Sysctls" |
	"Volume Types" |
	"Privilege Escalation" |
	"Running as Non-root" |
	"Running as Non-root user"

ControlName specifies the name of the Pod Security Standard control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/

images?: [...string]

Images selects matching containers and applies the container level PSS. Each image is the image name consisting of the registry address, repository, image, and tag. Empty list matches no containers, PSS checks are applied at the pod level only. Wildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.

[...]: string
restrictedField?: string

RestrictedField selects the field for the given Pod Security Standard control. When not set, all restricted fields for the control are selected.

values?: [...string]

Values defines the allowed values that can be excluded.

[...]: string
#UpdateRequest: ¶

UpdateRequest is a request to process mutate and generate rules in background.

apiVersion:
click to see definition
string
& "kyverno.io/v2"
¶

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind:
click to see definition
string
& "UpdateRequest"
¶

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata!: ¶
name!: string ¶
namespace!: string ¶
labels?: ¶
[string]: string ¶
annotations?: ¶
[string]: string ¶
spec?: ¶

ResourceSpec is the information to identify the trigger resource.

context!: ¶

Context represents admission request context. It is used upon admission review only and is shared across rules within the same UR.

admissionRequestInfo?: ¶

AdmissionRequestInfoObject stores the admission request and operation details

admissionRequest?: ¶

AdmissionRequest describes the admission.Attributes for the admission request.

dryRun?: bool ¶

dryRun indicates that modifications will definitely not be persisted for this request. Defaults to false.

kind!: ¶

kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)

group!: string ¶
kind!: string ¶
version!: string ¶
name?: string ¶

name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and rely on the server to generate the name. If that is the case, this field will contain an empty string.

namespace?: string ¶

namespace is the namespace associated with the request (if any).

object?: {...} ¶

object is the object from the incoming request.

oldObject?: {...} ¶

oldObject is the existing object. Only populated for DELETE and UPDATE requests.

operation!: string ¶

operation is the operation being performed. This may be different than the operation requested. e.g. a patch can result in either a CREATE or UPDATE Operation.

options?: {...} ¶

options is the operation option structure of the operation being performed. e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be different than the options the caller provided. e.g. for a patch request the performed Operation might be a CREATE, in which case the Options will a `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.

requestKind?: ¶

requestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale). If this is specified and differs from the value in "kind", an equivalent match and conversion was performed.

For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`, an API request to apps/v1beta1 deployments would be converted and sent to the webhook with `kind: {group:"apps", version:"v1", kind:"Deployment"}` (matching the rule the webhook registered for), and `requestKind: {group:"apps", version:"v1beta1", kind:"Deployment"}` (indicating the kind of the original API request).

See documentation for the "matchPolicy" field in the webhook configuration type for more details.

group!: string ¶
kind!: string ¶
version!: string ¶
requestResource?: ¶

requestResource is the fully-qualified resource of the original API request (for example, v1.pods). If this is specified and differs from the value in "resource", an equivalent match and conversion was performed.

For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`, an API request to apps/v1beta1 deployments would be converted and sent to the webhook with `resource: {group:"apps", version:"v1", resource:"deployments"}` (matching the resource the webhook registered for), and `requestResource: {group:"apps", version:"v1beta1", resource:"deployments"}` (indicating the resource of the original API request).

See documentation for the "matchPolicy" field in the webhook configuration type.

group!: string ¶
resource!: string ¶
version!: string ¶
requestSubResource?: string ¶

requestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale") If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed. See documentation for the "matchPolicy" field in the webhook configuration type.

resource!: ¶

resource is the fully-qualified resource being requested (for example, v1.pods)

group!: string ¶
resource!: string ¶
version!: string ¶
subResource?: string ¶

subResource is the subresource being requested, if any (for example, "status" or "scale")

uid!: string ¶

uid is an identifier for the individual request/response. It allows us to distinguish instances of requests which are otherwise identical (parallel requests, requests when earlier requests did not modify etc) The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.

userInfo!: ¶

userInfo is information about the requesting user

extra?: ¶

Any additional information provided by the authenticator.

[string]: [...string] ¶
groups?: [...string] ¶

The names of groups this user is a part of.

[...]: string
uid?: string ¶

A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.

username?: string ¶

The name that uniquely identifies this user among all active users.

operation?: string ¶

Operation is the type of resource operation being checked for admission control

userInfo?: ¶

RequestInfo contains permission info carried in an admission request.

clusterRoles?: null | [...string] ¶

ClusterRoles is a list of possible clusterRoles send the request.

[...]: string
roles?: null | [...string] ¶

Roles is a list of possible role send the request.

[...]: string
synchronize?: bool ¶

DryRun indicates that modifications will definitely not be persisted for this request. Defaults to false.

userInfo?: ¶

UserInfo is the userInfo carried in the admission request.

extra?: ¶

Any additional information provided by the authenticator.

[string]: [...string] ¶
[...]: string
groups?: [...string] ¶

The names of groups this user is a part of.

[...]: string
uid?: string ¶

A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.

username?: string ¶

The name that uniquely identifies this user among all active users.

deleteDownstream!: bool ¶

DeleteDownstream represents whether the downstream needs to be deleted. Deprecated

policy!: string ¶

Specifies the name of the policy.

requestType?: "mutate" | "generate" | "cel-generate" | "cel-mutate" ¶

Type represents request type for background processing

resource!: ¶

ResourceSpec is the information to identify the trigger resource.

apiVersion?: string ¶

APIVersion specifies resource apiVersion.

kind?: string ¶

Kind specifies resource kind.

name?: string ¶

Name specifies the resource name.

namespace?: string ¶

Namespace specifies resource namespace.

uid?: string ¶

UID specifies the resource uid.

rule!: string ¶

Rule is the associate rule name of the current UR.

ruleContext?:
click to see definition
[...{
	// CacheRestore indicates whether the cache should be restored.
	cacheRestore?: bool

	// DeleteDownstream represents whether the downstream needs to be deleted.
	deleteDownstream!: bool

	// Rule is the associate rule name of the current UR.
	rule!: string

	// Synchronize represents the sync behavior of the corresponding rule
	// Optional. Defaults to "false" if not specified.
	synchronize?: bool

	// ResourceSpec is the information to identify the trigger resource.
	trigger!: {
		// APIVersion specifies resource apiVersion.
		apiVersion?: string

		// Kind specifies resource kind.
		kind?: string

		// Name specifies the resource name.
		name?: string

		// Namespace specifies resource namespace.
		namespace?: string

		// UID specifies the resource uid.
		uid?: string
	}
}]
¶

RuleContext is the associate context to apply rules. optional

[...]:
cacheRestore?: bool

CacheRestore indicates whether the cache should be restored.

deleteDownstream!: bool

DeleteDownstream represents whether the downstream needs to be deleted.

rule!: string

Rule is the associate rule name of the current UR.

synchronize?: bool

Synchronize represents the sync behavior of the corresponding rule Optional. Defaults to "false" if not specified.

trigger!:

ResourceSpec is the information to identify the trigger resource.

apiVersion?: string

APIVersion specifies resource apiVersion.

kind?: string

Kind specifies resource kind.

name?: string

Name specifies the resource name.

namespace?: string

Namespace specifies resource namespace.

uid?: string

UID specifies the resource uid.

synchronize?: bool ¶

Synchronize represents the sync behavior of the corresponding rule Optional. Defaults to "false" if not specified. Deprecated, will be removed in 1.14.

status?: ¶

Status contains statistics related to update request.

generatedResources?:
click to see definition
[...{
	// APIVersion specifies resource apiVersion.
	apiVersion?: string

	// Kind specifies resource kind.
	kind?: string

	// Name specifies the resource name.
	name?: string

	// Namespace specifies resource namespace.
	namespace?: string

	// UID specifies the resource uid.
	uid?: string
}]
¶

This will track the resources that are updated by the generate Policy. Will be used during clean up resources.

[...]:
apiVersion?: string

APIVersion specifies resource apiVersion.

kind?: string

Kind specifies resource kind.

name?: string

Name specifies the resource name.

namespace?: string

Namespace specifies resource namespace.

uid?: string

UID specifies the resource uid.

message?: string ¶

Specifies request status message.

retryCount?: int ¶
state!: string ¶

State represents state of the update request.

Source files

  • CleanupPolicy.cue
  • ClusterCleanupPolicy.cue
  • GlobalContextEntry.cue
  • PolicyException.cue
  • UpdateRequest.cue