Skip to content

kyverno.v1.policy

"Policy declares validation, mutation, and generation behaviors for matching resources. See: https://kyverno.io/docs/writing-policies/ for more information."

Index

Fields

fn new

new(name)

new returns an instance of Policy

obj metadata

"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create."

fn metadata.withAnnotations

withAnnotations(annotations)

"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations"

fn metadata.withAnnotationsMixin

withAnnotationsMixin(annotations)

"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations"

Note: This function appends passed data to existing values

fn metadata.withClusterName

withClusterName(clusterName)

"The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request."

fn metadata.withCreationTimestamp

withCreationTimestamp(creationTimestamp)

"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."

fn metadata.withDeletionGracePeriodSeconds

withDeletionGracePeriodSeconds(deletionGracePeriodSeconds)

"Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only."

fn metadata.withDeletionTimestamp

withDeletionTimestamp(deletionTimestamp)

"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."

fn metadata.withFinalizers

withFinalizers(finalizers)

"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list."

fn metadata.withFinalizersMixin

withFinalizersMixin(finalizers)

"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list."

Note: This function appends passed data to existing values

fn metadata.withGenerateName

withGenerateName(generateName)

"GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency"

fn metadata.withGeneration

withGeneration(generation)

"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only."

fn metadata.withLabels

withLabels(labels)

"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels"

fn metadata.withLabelsMixin

withLabelsMixin(labels)

"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels"

Note: This function appends passed data to existing values

fn metadata.withName

withName(name)

"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names"

fn metadata.withNamespace

withNamespace(namespace)

"Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces"

fn metadata.withOwnerReferences

withOwnerReferences(ownerReferences)

"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."

fn metadata.withOwnerReferencesMixin

withOwnerReferencesMixin(ownerReferences)

"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."

Note: This function appends passed data to existing values

fn metadata.withResourceVersion

withResourceVersion(resourceVersion)

"An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency"

withSelfLink(selfLink)

"SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release."

fn metadata.withUid

withUid(uid)

"UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids"

obj spec

"Spec defines policy behaviors and contains one or more rules."

fn spec.withAdmission

withAdmission(admission)

"Admission controls if rules are applied during admission. Optional. Default value is \"true\"."

fn spec.withApplyRules

withApplyRules(applyRules)

"ApplyRules controls how rules in a policy are applied. Rule are processed in the order of declaration. When set to One processing stops after a rule has been applied i.e. the rule matches and results in a pass, fail, or error. When set to All all rules in the policy are processed. The default is All."

fn spec.withBackground

withBackground(background)

"Background controls if rules are applied to existing resources 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)."

fn spec.withFailurePolicy

withFailurePolicy(failurePolicy)

"FailurePolicy defines how unexpected policy errors and webhook response timeout errors are handled. Rules within the same policy share the same failure behavior. This field should not be accessed directly, instead GetFailurePolicy() should be used. Allowed values are Ignore or Fail. Defaults to Fail."

fn spec.withGenerateExisting

withGenerateExisting(generateExisting)

"GenerateExisting controls whether to trigger generate rule in existing resources If is set to \"true\" generate rule will be triggered and applied to existing matched resources. Defaults to \"false\" if not specified."

fn spec.withGenerateExistingOnPolicyUpdate

withGenerateExistingOnPolicyUpdate(generateExistingOnPolicyUpdate)

"Deprecated, use generateExisting instead"

fn spec.withMutateExistingOnPolicyUpdate

withMutateExistingOnPolicyUpdate(mutateExistingOnPolicyUpdate)

"MutateExistingOnPolicyUpdate controls if a mutateExisting policy is applied on policy events. Default value is \"false\"."

fn spec.withRules

withRules(rules)

"Rules is a list of Rule instances. A Policy contains multiple rules and each rule can validate, mutate, or generate resources."

fn spec.withRulesMixin

withRulesMixin(rules)

"Rules is a list of Rule instances. A Policy contains multiple rules and each rule can validate, mutate, or generate resources."

Note: This function appends passed data to existing values

fn spec.withSchemaValidation

withSchemaValidation(schemaValidation)

"Deprecated."

fn spec.withUseServerSideApply

withUseServerSideApply(useServerSideApply)

"UseServerSideApply controls whether to use server-side apply for generate rules If is set to \"true\" create & update for generate rules will use apply instead of create/update. Defaults to \"false\" if not specified."

fn spec.withValidationFailureAction

withValidationFailureAction(validationFailureAction)

"ValidationFailureAction defines if a validation policy rule violation should block the admission review request (enforce), or allow (audit) the admission review request and report an error in a policy report. Optional. Allowed values are audit or enforce. The default value is \"Audit\"."

fn spec.withValidationFailureActionOverrides

withValidationFailureActionOverrides(validationFailureActionOverrides)

"ValidationFailureActionOverrides is a Cluster Policy attribute that specifies ValidationFailureAction namespace-wise. It overrides ValidationFailureAction for the specified namespaces."

fn spec.withValidationFailureActionOverridesMixin

withValidationFailureActionOverridesMixin(validationFailureActionOverrides)

"ValidationFailureActionOverrides is a Cluster Policy attribute that specifies ValidationFailureAction namespace-wise. It overrides ValidationFailureAction for the specified namespaces."

Note: This function appends passed data to existing values

fn spec.withWebhookTimeoutSeconds

withWebhookTimeoutSeconds(webhookTimeoutSeconds)

"WebhookTimeoutSeconds specifies the maximum time in seconds allowed to apply this policy. After the configured time expires, the admission request may fail, or may simply ignore the policy results, based on the failure policy. The default timeout is 10s, the value must be between 1 and 30 seconds."

obj spec.rules

"Rules is a list of Rule instances. A Policy contains multiple rules and each rule can validate, mutate, or generate resources."

fn spec.rules.withCelPreconditions

withCelPreconditions(celPreconditions)

"CELPreconditions are used to determine if a policy rule should be applied by evaluating a set of CEL conditions. It can only be used with the validate.cel subrule"

fn spec.rules.withCelPreconditionsMixin

withCelPreconditionsMixin(celPreconditions)

"CELPreconditions are used to determine if a policy rule should be applied by evaluating a set of CEL conditions. It can only be used with the validate.cel subrule"

Note: This function appends passed data to existing values

fn spec.rules.withContext

withContext(context)

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

fn spec.rules.withContextMixin

withContextMixin(context)

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

Note: This function appends passed data to existing values

fn spec.rules.withImageExtractors

withImageExtractors(imageExtractors)

"ImageExtractors defines a mapping from kinds to ImageExtractorConfigs. This config is only valid for verifyImages rules."

fn spec.rules.withImageExtractorsMixin

withImageExtractorsMixin(imageExtractors)

"ImageExtractors defines a mapping from kinds to ImageExtractorConfigs. This config is only valid for verifyImages rules."

Note: This function appends passed data to existing values

fn spec.rules.withName

withName(name)

"Name is a label to identify the rule, It must be unique within the policy."

fn spec.rules.withPreconditions

withPreconditions(preconditions)

"Preconditions are used to determine if a policy rule should be applied by evaluating a set of conditions. The declaration can contain nested any or all statements. A direct list of conditions (without any or all statements is supported for backwards compatibility but will be deprecated in the next major release. See: https://kyverno.io/docs/writing-policies/preconditions/"

fn spec.rules.withSkipBackgroundRequests

withSkipBackgroundRequests(skipBackgroundRequests)

"SkipBackgroundRequests bypasses admission requests that are sent by the background controller. The default value is set to \"true\", it must be set to \"false\" to apply generate and mutateExisting rules to those requests."

fn spec.rules.withVerifyImages

withVerifyImages(verifyImages)

"VerifyImages is used to verify image signatures and mutate them to add a digest"

fn spec.rules.withVerifyImagesMixin

withVerifyImagesMixin(verifyImages)

"VerifyImages is used to verify image signatures and mutate them to add a digest"

Note: This function appends passed data to existing values

obj spec.rules.celPreconditions

"CELPreconditions are used to determine if a policy rule should be applied by evaluating a set of CEL conditions. It can only be used with the validate.cel subrule"

fn spec.rules.celPreconditions.withExpression

withExpression(expression)

"Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables: \n 'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/ \n Required."

fn spec.rules.celPreconditions.withName

withName(name)

"Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') \n Required."

obj spec.rules.context

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

fn spec.rules.context.withName

withName(name)

"Name is the variable name."

obj spec.rules.context.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."

fn spec.rules.context.apiCall.withData

withData(data)

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

fn spec.rules.context.apiCall.withDataMixin

withDataMixin(data)

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

Note: This function appends passed data to existing values

fn spec.rules.context.apiCall.withJmesPath

withJmesPath(jmesPath)

"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."

fn spec.rules.context.apiCall.withMethod

withMethod(method)

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

fn spec.rules.context.apiCall.withUrlPath

withUrlPath(urlPath)

"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."

obj spec.rules.context.apiCall.data

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

fn spec.rules.context.apiCall.data.withKey

withKey(key)

"Key is a unique identifier for the data value"

fn spec.rules.context.apiCall.data.withValue

withValue(value)

"Value is the data value"

obj spec.rules.context.apiCall.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."

fn spec.rules.context.apiCall.service.withCaBundle

withCaBundle(caBundle)

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

fn spec.rules.context.apiCall.service.withUrl

withUrl(url)

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

obj spec.rules.context.configMap

"ConfigMap is the ConfigMap reference."

fn spec.rules.context.configMap.withName

withName(name)

"Name is the ConfigMap name."

fn spec.rules.context.configMap.withNamespace

withNamespace(namespace)

"Namespace is the ConfigMap namespace."

obj spec.rules.context.globalReference

"GlobalContextEntryReference is a reference to a cached global context entry."

fn spec.rules.context.globalReference.withJmesPath

withJmesPath(jmesPath)

"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."

fn spec.rules.context.globalReference.withName

withName(name)

"Name of the global context entry"

obj spec.rules.context.imageRegistry

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

fn spec.rules.context.imageRegistry.withJmesPath

withJmesPath(jmesPath)

"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."

fn spec.rules.context.imageRegistry.withReference

withReference(reference)

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

obj spec.rules.context.imageRegistry.imageRegistryCredentials

"ImageRegistryCredentials provides credentials that will be used for authentication with registry"

fn spec.rules.context.imageRegistry.imageRegistryCredentials.withAllowInsecureRegistry

withAllowInsecureRegistry(allowInsecureRegistry)

"AllowInsecureRegistry allows insecure access to a registry."

fn spec.rules.context.imageRegistry.imageRegistryCredentials.withProviders

withProviders(providers)

"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."

fn spec.rules.context.imageRegistry.imageRegistryCredentials.withProvidersMixin

withProvidersMixin(providers)

"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."

Note: This function appends passed data to existing values

fn spec.rules.context.imageRegistry.imageRegistryCredentials.withSecrets

withSecrets(secrets)

"Secrets specifies a list of secrets that are provided for credentials. Secrets must live in the Kyverno namespace."

fn spec.rules.context.imageRegistry.imageRegistryCredentials.withSecretsMixin

withSecretsMixin(secrets)

"Secrets specifies a list of secrets that are provided for credentials. Secrets must live in the Kyverno namespace."

Note: This function appends passed data to existing values

obj spec.rules.context.variable

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

fn spec.rules.context.variable.withDefault

withDefault(default)

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

fn spec.rules.context.variable.withJmesPath

withJmesPath(jmesPath)

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

fn spec.rules.context.variable.withValue

withValue(value)

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

obj spec.rules.exclude

"ExcludeResources defines when this policy rule 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."

fn spec.rules.exclude.withAll

withAll(all)

"All allows specifying resources which will be ANDed"

fn spec.rules.exclude.withAllMixin

withAllMixin(all)

"All allows specifying resources which will be ANDed"

Note: This function appends passed data to existing values

fn spec.rules.exclude.withAny

withAny(any)

"Any allows specifying resources which will be ORed"

fn spec.rules.exclude.withAnyMixin

withAnyMixin(any)

"Any allows specifying resources which will be ORed"

Note: This function appends passed data to existing values

fn spec.rules.exclude.withClusterRoles

withClusterRoles(clusterRoles)

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

fn spec.rules.exclude.withClusterRolesMixin

withClusterRolesMixin(clusterRoles)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.withRoles

withRoles(roles)

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

fn spec.rules.exclude.withRolesMixin

withRolesMixin(roles)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.withSubjects

withSubjects(subjects)

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

fn spec.rules.exclude.withSubjectsMixin

withSubjectsMixin(subjects)

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

Note: This function appends passed data to existing values

obj spec.rules.exclude.all

"All allows specifying resources which will be ANDed"

fn spec.rules.exclude.all.withClusterRoles

withClusterRoles(clusterRoles)

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

fn spec.rules.exclude.all.withClusterRolesMixin

withClusterRolesMixin(clusterRoles)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.all.withRoles

withRoles(roles)

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

fn spec.rules.exclude.all.withRolesMixin

withRolesMixin(roles)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.all.withSubjects

withSubjects(subjects)

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

fn spec.rules.exclude.all.withSubjectsMixin

withSubjectsMixin(subjects)

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

Note: This function appends passed data to existing values

obj spec.rules.exclude.all.resources

"ResourceDescription contains information about the resource being created or modified."

fn spec.rules.exclude.all.resources.withAnnotations

withAnnotations(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)."

fn spec.rules.exclude.all.resources.withAnnotationsMixin

withAnnotationsMixin(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)."

Note: This function appends passed data to existing values

fn spec.rules.exclude.all.resources.withKinds

withKinds(kinds)

"Kinds is a list of resource kinds."

fn spec.rules.exclude.all.resources.withKindsMixin

withKindsMixin(kinds)

"Kinds is a list of resource kinds."

Note: This function appends passed data to existing values

fn spec.rules.exclude.all.resources.withName

withName(name)

"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\"."

fn spec.rules.exclude.all.resources.withNames

withNames(names)

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

fn spec.rules.exclude.all.resources.withNamesMixin

withNamesMixin(names)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.all.resources.withNamespaces

withNamespaces(namespaces)

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

fn spec.rules.exclude.all.resources.withNamespacesMixin

withNamespacesMixin(namespaces)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.all.resources.withOperations

withOperations(operations)

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

fn spec.rules.exclude.all.resources.withOperationsMixin

withOperationsMixin(operations)

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

Note: This function appends passed data to existing values

obj spec.rules.exclude.all.resources.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."

fn spec.rules.exclude.all.resources.namespaceSelector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.exclude.all.resources.namespaceSelector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.all.resources.namespaceSelector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.exclude.all.resources.namespaceSelector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.exclude.all.resources.namespaceSelector.matchExpressions

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

fn spec.rules.exclude.all.resources.namespaceSelector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.exclude.all.resources.namespaceSelector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.exclude.all.resources.namespaceSelector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.exclude.all.resources.namespaceSelector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.exclude.all.resources.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."

fn spec.rules.exclude.all.resources.selector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.exclude.all.resources.selector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.all.resources.selector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.exclude.all.resources.selector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.exclude.all.resources.selector.matchExpressions

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

fn spec.rules.exclude.all.resources.selector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.exclude.all.resources.selector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.exclude.all.resources.selector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.exclude.all.resources.selector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.exclude.all.subjects

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

fn spec.rules.exclude.all.subjects.withApiGroup

withApiGroup(apiGroup)

"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."

fn spec.rules.exclude.all.subjects.withKind

withKind(kind)

"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."

fn spec.rules.exclude.all.subjects.withName

withName(name)

"Name of the object being referenced."

fn spec.rules.exclude.all.subjects.withNamespace

withNamespace(namespace)

"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."

obj spec.rules.exclude.any

"Any allows specifying resources which will be ORed"

fn spec.rules.exclude.any.withClusterRoles

withClusterRoles(clusterRoles)

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

fn spec.rules.exclude.any.withClusterRolesMixin

withClusterRolesMixin(clusterRoles)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.any.withRoles

withRoles(roles)

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

fn spec.rules.exclude.any.withRolesMixin

withRolesMixin(roles)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.any.withSubjects

withSubjects(subjects)

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

fn spec.rules.exclude.any.withSubjectsMixin

withSubjectsMixin(subjects)

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

Note: This function appends passed data to existing values

obj spec.rules.exclude.any.resources

"ResourceDescription contains information about the resource being created or modified."

fn spec.rules.exclude.any.resources.withAnnotations

withAnnotations(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)."

fn spec.rules.exclude.any.resources.withAnnotationsMixin

withAnnotationsMixin(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)."

Note: This function appends passed data to existing values

fn spec.rules.exclude.any.resources.withKinds

withKinds(kinds)

"Kinds is a list of resource kinds."

fn spec.rules.exclude.any.resources.withKindsMixin

withKindsMixin(kinds)

"Kinds is a list of resource kinds."

Note: This function appends passed data to existing values

fn spec.rules.exclude.any.resources.withName

withName(name)

"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\"."

fn spec.rules.exclude.any.resources.withNames

withNames(names)

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

fn spec.rules.exclude.any.resources.withNamesMixin

withNamesMixin(names)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.any.resources.withNamespaces

withNamespaces(namespaces)

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

fn spec.rules.exclude.any.resources.withNamespacesMixin

withNamespacesMixin(namespaces)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.any.resources.withOperations

withOperations(operations)

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

fn spec.rules.exclude.any.resources.withOperationsMixin

withOperationsMixin(operations)

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

Note: This function appends passed data to existing values

obj spec.rules.exclude.any.resources.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."

fn spec.rules.exclude.any.resources.namespaceSelector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.exclude.any.resources.namespaceSelector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.any.resources.namespaceSelector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.exclude.any.resources.namespaceSelector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.exclude.any.resources.namespaceSelector.matchExpressions

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

fn spec.rules.exclude.any.resources.namespaceSelector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.exclude.any.resources.namespaceSelector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.exclude.any.resources.namespaceSelector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.exclude.any.resources.namespaceSelector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.exclude.any.resources.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."

fn spec.rules.exclude.any.resources.selector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.exclude.any.resources.selector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.any.resources.selector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.exclude.any.resources.selector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.exclude.any.resources.selector.matchExpressions

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

fn spec.rules.exclude.any.resources.selector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.exclude.any.resources.selector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.exclude.any.resources.selector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.exclude.any.resources.selector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.exclude.any.subjects

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

fn spec.rules.exclude.any.subjects.withApiGroup

withApiGroup(apiGroup)

"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."

fn spec.rules.exclude.any.subjects.withKind

withKind(kind)

"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."

fn spec.rules.exclude.any.subjects.withName

withName(name)

"Name of the object being referenced."

fn spec.rules.exclude.any.subjects.withNamespace

withNamespace(namespace)

"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."

obj spec.rules.exclude.resources

"ResourceDescription contains information about the resource being created or modified. Requires at least one tag to be specified when under MatchResources. Specifying ResourceDescription directly under match is being deprecated. Please specify under \"any\" or \"all\" instead."

fn spec.rules.exclude.resources.withAnnotations

withAnnotations(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)."

fn spec.rules.exclude.resources.withAnnotationsMixin

withAnnotationsMixin(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)."

Note: This function appends passed data to existing values

fn spec.rules.exclude.resources.withKinds

withKinds(kinds)

"Kinds is a list of resource kinds."

fn spec.rules.exclude.resources.withKindsMixin

withKindsMixin(kinds)

"Kinds is a list of resource kinds."

Note: This function appends passed data to existing values

fn spec.rules.exclude.resources.withName

withName(name)

"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\"."

fn spec.rules.exclude.resources.withNames

withNames(names)

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

fn spec.rules.exclude.resources.withNamesMixin

withNamesMixin(names)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.resources.withNamespaces

withNamespaces(namespaces)

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

fn spec.rules.exclude.resources.withNamespacesMixin

withNamespacesMixin(namespaces)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.resources.withOperations

withOperations(operations)

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

fn spec.rules.exclude.resources.withOperationsMixin

withOperationsMixin(operations)

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

Note: This function appends passed data to existing values

obj spec.rules.exclude.resources.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."

fn spec.rules.exclude.resources.namespaceSelector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.exclude.resources.namespaceSelector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.resources.namespaceSelector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.exclude.resources.namespaceSelector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.exclude.resources.namespaceSelector.matchExpressions

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

fn spec.rules.exclude.resources.namespaceSelector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.exclude.resources.namespaceSelector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.exclude.resources.namespaceSelector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.exclude.resources.namespaceSelector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.exclude.resources.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."

fn spec.rules.exclude.resources.selector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.exclude.resources.selector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.exclude.resources.selector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.exclude.resources.selector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.exclude.resources.selector.matchExpressions

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

fn spec.rules.exclude.resources.selector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.exclude.resources.selector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.exclude.resources.selector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.exclude.resources.selector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.exclude.subjects

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

fn spec.rules.exclude.subjects.withApiGroup

withApiGroup(apiGroup)

"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."

fn spec.rules.exclude.subjects.withKind

withKind(kind)

"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."

fn spec.rules.exclude.subjects.withName

withName(name)

"Name of the object being referenced."

fn spec.rules.exclude.subjects.withNamespace

withNamespace(namespace)

"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."

obj spec.rules.generate

"Generation is used to create new resources."

fn spec.rules.generate.withApiVersion

withApiVersion(apiVersion)

"APIVersion specifies resource apiVersion."

fn spec.rules.generate.withData

withData(data)

"Data provides the resource declaration used to populate each generated resource. At most one of Data or Clone must be specified. If neither are provided, the generated resource will be created with default data only."

fn spec.rules.generate.withKind

withKind(kind)

"Kind specifies resource kind."

fn spec.rules.generate.withName

withName(name)

"Name specifies the resource name."

fn spec.rules.generate.withNamespace

withNamespace(namespace)

"Namespace specifies resource namespace."

fn spec.rules.generate.withOrphanDownstreamOnPolicyDelete

withOrphanDownstreamOnPolicyDelete(orphanDownstreamOnPolicyDelete)

"OrphanDownstreamOnPolicyDelete controls whether generated resources should be deleted when the rule that generated them is deleted with synchronization enabled. This option is only applicable to generate rules of the data type. See https://kyverno.io/docs/writing-policies/generate/#data-examples. Defaults to \"false\" if not specified."

fn spec.rules.generate.withSynchronize

withSynchronize(synchronize)

"Synchronize controls if generated resources should be kept in-sync with their source resource. If Synchronize is set to \"true\" changes to generated resources will be overwritten with resource data from Data or the resource specified in the Clone declaration. Optional. Defaults to \"false\" if not specified."

fn spec.rules.generate.withUid

withUid(uid)

"UID specifies the resource uid."

obj spec.rules.generate.clone

"Clone specifies the source resource used to populate each generated resource. At most one of Data or Clone can be specified. If neither are provided, the generated resource will be created with default data only."

fn spec.rules.generate.clone.withName

withName(name)

"Name specifies name of the resource."

fn spec.rules.generate.clone.withNamespace

withNamespace(namespace)

"Namespace specifies source resource namespace."

obj spec.rules.generate.cloneList

"CloneList specifies the list of source resource used to populate each generated resource."

fn spec.rules.generate.cloneList.withKinds

withKinds(kinds)

"Kinds is a list of resource kinds."

fn spec.rules.generate.cloneList.withKindsMixin

withKindsMixin(kinds)

"Kinds is a list of resource kinds."

Note: This function appends passed data to existing values

fn spec.rules.generate.cloneList.withNamespace

withNamespace(namespace)

"Namespace specifies source resource namespace."

obj spec.rules.generate.cloneList.selector

"Selector is a label selector. Label keys and values in matchLabels. wildcard characters are not supported."

fn spec.rules.generate.cloneList.selector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.generate.cloneList.selector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.generate.cloneList.selector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.generate.cloneList.selector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.generate.cloneList.selector.matchExpressions

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

fn spec.rules.generate.cloneList.selector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.generate.cloneList.selector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.generate.cloneList.selector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.generate.cloneList.selector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.match

"MatchResources defines when this policy rule 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."

fn spec.rules.match.withAll

withAll(all)

"All allows specifying resources which will be ANDed"

fn spec.rules.match.withAllMixin

withAllMixin(all)

"All allows specifying resources which will be ANDed"

Note: This function appends passed data to existing values

fn spec.rules.match.withAny

withAny(any)

"Any allows specifying resources which will be ORed"

fn spec.rules.match.withAnyMixin

withAnyMixin(any)

"Any allows specifying resources which will be ORed"

Note: This function appends passed data to existing values

fn spec.rules.match.withClusterRoles

withClusterRoles(clusterRoles)

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

fn spec.rules.match.withClusterRolesMixin

withClusterRolesMixin(clusterRoles)

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

Note: This function appends passed data to existing values

fn spec.rules.match.withRoles

withRoles(roles)

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

fn spec.rules.match.withRolesMixin

withRolesMixin(roles)

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

Note: This function appends passed data to existing values

fn spec.rules.match.withSubjects

withSubjects(subjects)

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

fn spec.rules.match.withSubjectsMixin

withSubjectsMixin(subjects)

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

Note: This function appends passed data to existing values

obj spec.rules.match.all

"All allows specifying resources which will be ANDed"

fn spec.rules.match.all.withClusterRoles

withClusterRoles(clusterRoles)

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

fn spec.rules.match.all.withClusterRolesMixin

withClusterRolesMixin(clusterRoles)

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

Note: This function appends passed data to existing values

fn spec.rules.match.all.withRoles

withRoles(roles)

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

fn spec.rules.match.all.withRolesMixin

withRolesMixin(roles)

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

Note: This function appends passed data to existing values

fn spec.rules.match.all.withSubjects

withSubjects(subjects)

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

fn spec.rules.match.all.withSubjectsMixin

withSubjectsMixin(subjects)

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

Note: This function appends passed data to existing values

obj spec.rules.match.all.resources

"ResourceDescription contains information about the resource being created or modified."

fn spec.rules.match.all.resources.withAnnotations

withAnnotations(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)."

fn spec.rules.match.all.resources.withAnnotationsMixin

withAnnotationsMixin(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)."

Note: This function appends passed data to existing values

fn spec.rules.match.all.resources.withKinds

withKinds(kinds)

"Kinds is a list of resource kinds."

fn spec.rules.match.all.resources.withKindsMixin

withKindsMixin(kinds)

"Kinds is a list of resource kinds."

Note: This function appends passed data to existing values

fn spec.rules.match.all.resources.withName

withName(name)

"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\"."

fn spec.rules.match.all.resources.withNames

withNames(names)

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

fn spec.rules.match.all.resources.withNamesMixin

withNamesMixin(names)

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

Note: This function appends passed data to existing values

fn spec.rules.match.all.resources.withNamespaces

withNamespaces(namespaces)

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

fn spec.rules.match.all.resources.withNamespacesMixin

withNamespacesMixin(namespaces)

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

Note: This function appends passed data to existing values

fn spec.rules.match.all.resources.withOperations

withOperations(operations)

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

fn spec.rules.match.all.resources.withOperationsMixin

withOperationsMixin(operations)

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

Note: This function appends passed data to existing values

obj spec.rules.match.all.resources.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."

fn spec.rules.match.all.resources.namespaceSelector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.match.all.resources.namespaceSelector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.match.all.resources.namespaceSelector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.match.all.resources.namespaceSelector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.match.all.resources.namespaceSelector.matchExpressions

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

fn spec.rules.match.all.resources.namespaceSelector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.match.all.resources.namespaceSelector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.match.all.resources.namespaceSelector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.match.all.resources.namespaceSelector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.match.all.resources.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."

fn spec.rules.match.all.resources.selector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.match.all.resources.selector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.match.all.resources.selector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.match.all.resources.selector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.match.all.resources.selector.matchExpressions

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

fn spec.rules.match.all.resources.selector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.match.all.resources.selector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.match.all.resources.selector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.match.all.resources.selector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.match.all.subjects

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

fn spec.rules.match.all.subjects.withApiGroup

withApiGroup(apiGroup)

"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."

fn spec.rules.match.all.subjects.withKind

withKind(kind)

"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."

fn spec.rules.match.all.subjects.withName

withName(name)

"Name of the object being referenced."

fn spec.rules.match.all.subjects.withNamespace

withNamespace(namespace)

"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."

obj spec.rules.match.any

"Any allows specifying resources which will be ORed"

fn spec.rules.match.any.withClusterRoles

withClusterRoles(clusterRoles)

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

fn spec.rules.match.any.withClusterRolesMixin

withClusterRolesMixin(clusterRoles)

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

Note: This function appends passed data to existing values

fn spec.rules.match.any.withRoles

withRoles(roles)

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

fn spec.rules.match.any.withRolesMixin

withRolesMixin(roles)

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

Note: This function appends passed data to existing values

fn spec.rules.match.any.withSubjects

withSubjects(subjects)

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

fn spec.rules.match.any.withSubjectsMixin

withSubjectsMixin(subjects)

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

Note: This function appends passed data to existing values

obj spec.rules.match.any.resources

"ResourceDescription contains information about the resource being created or modified."

fn spec.rules.match.any.resources.withAnnotations

withAnnotations(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)."

fn spec.rules.match.any.resources.withAnnotationsMixin

withAnnotationsMixin(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)."

Note: This function appends passed data to existing values

fn spec.rules.match.any.resources.withKinds

withKinds(kinds)

"Kinds is a list of resource kinds."

fn spec.rules.match.any.resources.withKindsMixin

withKindsMixin(kinds)

"Kinds is a list of resource kinds."

Note: This function appends passed data to existing values

fn spec.rules.match.any.resources.withName

withName(name)

"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\"."

fn spec.rules.match.any.resources.withNames

withNames(names)

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

fn spec.rules.match.any.resources.withNamesMixin

withNamesMixin(names)

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

Note: This function appends passed data to existing values

fn spec.rules.match.any.resources.withNamespaces

withNamespaces(namespaces)

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

fn spec.rules.match.any.resources.withNamespacesMixin

withNamespacesMixin(namespaces)

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

Note: This function appends passed data to existing values

fn spec.rules.match.any.resources.withOperations

withOperations(operations)

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

fn spec.rules.match.any.resources.withOperationsMixin

withOperationsMixin(operations)

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

Note: This function appends passed data to existing values

obj spec.rules.match.any.resources.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."

fn spec.rules.match.any.resources.namespaceSelector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.match.any.resources.namespaceSelector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.match.any.resources.namespaceSelector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.match.any.resources.namespaceSelector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.match.any.resources.namespaceSelector.matchExpressions

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

fn spec.rules.match.any.resources.namespaceSelector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.match.any.resources.namespaceSelector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.match.any.resources.namespaceSelector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.match.any.resources.namespaceSelector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.match.any.resources.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."

fn spec.rules.match.any.resources.selector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.match.any.resources.selector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.match.any.resources.selector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.match.any.resources.selector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.match.any.resources.selector.matchExpressions

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

fn spec.rules.match.any.resources.selector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.match.any.resources.selector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.match.any.resources.selector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.match.any.resources.selector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.match.any.subjects

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

fn spec.rules.match.any.subjects.withApiGroup

withApiGroup(apiGroup)

"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."

fn spec.rules.match.any.subjects.withKind

withKind(kind)

"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."

fn spec.rules.match.any.subjects.withName

withName(name)

"Name of the object being referenced."

fn spec.rules.match.any.subjects.withNamespace

withNamespace(namespace)

"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."

obj spec.rules.match.resources

"ResourceDescription contains information about the resource being created or modified. Requires at least one tag to be specified when under MatchResources. Specifying ResourceDescription directly under match is being deprecated. Please specify under \"any\" or \"all\" instead."

fn spec.rules.match.resources.withAnnotations

withAnnotations(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)."

fn spec.rules.match.resources.withAnnotationsMixin

withAnnotationsMixin(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)."

Note: This function appends passed data to existing values

fn spec.rules.match.resources.withKinds

withKinds(kinds)

"Kinds is a list of resource kinds."

fn spec.rules.match.resources.withKindsMixin

withKindsMixin(kinds)

"Kinds is a list of resource kinds."

Note: This function appends passed data to existing values

fn spec.rules.match.resources.withName

withName(name)

"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\"."

fn spec.rules.match.resources.withNames

withNames(names)

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

fn spec.rules.match.resources.withNamesMixin

withNamesMixin(names)

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

Note: This function appends passed data to existing values

fn spec.rules.match.resources.withNamespaces

withNamespaces(namespaces)

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

fn spec.rules.match.resources.withNamespacesMixin

withNamespacesMixin(namespaces)

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

Note: This function appends passed data to existing values

fn spec.rules.match.resources.withOperations

withOperations(operations)

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

fn spec.rules.match.resources.withOperationsMixin

withOperationsMixin(operations)

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

Note: This function appends passed data to existing values

obj spec.rules.match.resources.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."

fn spec.rules.match.resources.namespaceSelector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.match.resources.namespaceSelector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.match.resources.namespaceSelector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.match.resources.namespaceSelector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.match.resources.namespaceSelector.matchExpressions

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

fn spec.rules.match.resources.namespaceSelector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.match.resources.namespaceSelector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.match.resources.namespaceSelector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.match.resources.namespaceSelector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.match.resources.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."

fn spec.rules.match.resources.selector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.match.resources.selector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.match.resources.selector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.match.resources.selector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.match.resources.selector.matchExpressions

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

fn spec.rules.match.resources.selector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.match.resources.selector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.match.resources.selector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.match.resources.selector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.match.subjects

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

fn spec.rules.match.subjects.withApiGroup

withApiGroup(apiGroup)

"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."

fn spec.rules.match.subjects.withKind

withKind(kind)

"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."

fn spec.rules.match.subjects.withName

withName(name)

"Name of the object being referenced."

fn spec.rules.match.subjects.withNamespace

withNamespace(namespace)

"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."

obj spec.rules.mutate

"Mutation is used to modify matching resources."

fn spec.rules.mutate.withForeach

withForeach(foreach)

"ForEach applies mutation rules to a list of sub-elements by creating a context for each entry in the list and looping over it to apply the specified logic."

fn spec.rules.mutate.withForeachMixin

withForeachMixin(foreach)

"ForEach applies mutation rules to a list of sub-elements by creating a context for each entry in the list and looping over it to apply the specified logic."

Note: This function appends passed data to existing values

fn spec.rules.mutate.withPatchStrategicMerge

withPatchStrategicMerge(patchStrategicMerge)

"PatchStrategicMerge is a strategic merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."

fn spec.rules.mutate.withPatchesJson6902

withPatchesJson6902(patchesJson6902)

"PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."

fn spec.rules.mutate.withTargets

withTargets(targets)

"Targets defines the target resources to be mutated."

fn spec.rules.mutate.withTargetsMixin

withTargetsMixin(targets)

"Targets defines the target resources to be mutated."

Note: This function appends passed data to existing values

obj spec.rules.mutate.foreach

"ForEach applies mutation rules to a list of sub-elements by creating a context for each entry in the list and looping over it to apply the specified logic."

fn spec.rules.mutate.foreach.withContext

withContext(context)

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

fn spec.rules.mutate.foreach.withContextMixin

withContextMixin(context)

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

Note: This function appends passed data to existing values

fn spec.rules.mutate.foreach.withForeach

withForeach(foreach)

"Foreach declares a nested foreach iterator"

fn spec.rules.mutate.foreach.withList

withList(list)

"List specifies a JMESPath expression that results in one or more elements to which the validation logic is applied."

fn spec.rules.mutate.foreach.withOrder

withOrder(order)

"Order defines the iteration order on the list. Can be Ascending to iterate from first to last element or Descending to iterate in from last to first element."

fn spec.rules.mutate.foreach.withPatchStrategicMerge

withPatchStrategicMerge(patchStrategicMerge)

"PatchStrategicMerge is a strategic merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."

fn spec.rules.mutate.foreach.withPatchesJson6902

withPatchesJson6902(patchesJson6902)

"PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."

obj spec.rules.mutate.foreach.context

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

fn spec.rules.mutate.foreach.context.withName

withName(name)

"Name is the variable name."

obj spec.rules.mutate.foreach.context.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."

fn spec.rules.mutate.foreach.context.apiCall.withData

withData(data)

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

fn spec.rules.mutate.foreach.context.apiCall.withDataMixin

withDataMixin(data)

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

Note: This function appends passed data to existing values

fn spec.rules.mutate.foreach.context.apiCall.withJmesPath

withJmesPath(jmesPath)

"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."

fn spec.rules.mutate.foreach.context.apiCall.withMethod

withMethod(method)

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

fn spec.rules.mutate.foreach.context.apiCall.withUrlPath

withUrlPath(urlPath)

"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."

obj spec.rules.mutate.foreach.context.apiCall.data

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

fn spec.rules.mutate.foreach.context.apiCall.data.withKey

withKey(key)

"Key is a unique identifier for the data value"

fn spec.rules.mutate.foreach.context.apiCall.data.withValue

withValue(value)

"Value is the data value"

obj spec.rules.mutate.foreach.context.apiCall.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."

fn spec.rules.mutate.foreach.context.apiCall.service.withCaBundle

withCaBundle(caBundle)

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

fn spec.rules.mutate.foreach.context.apiCall.service.withUrl

withUrl(url)

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

obj spec.rules.mutate.foreach.context.configMap

"ConfigMap is the ConfigMap reference."

fn spec.rules.mutate.foreach.context.configMap.withName

withName(name)

"Name is the ConfigMap name."

fn spec.rules.mutate.foreach.context.configMap.withNamespace

withNamespace(namespace)

"Namespace is the ConfigMap namespace."

obj spec.rules.mutate.foreach.context.globalReference

"GlobalContextEntryReference is a reference to a cached global context entry."

fn spec.rules.mutate.foreach.context.globalReference.withJmesPath

withJmesPath(jmesPath)

"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."

fn spec.rules.mutate.foreach.context.globalReference.withName

withName(name)

"Name of the global context entry"

obj spec.rules.mutate.foreach.context.imageRegistry

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

fn spec.rules.mutate.foreach.context.imageRegistry.withJmesPath

withJmesPath(jmesPath)

"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."

fn spec.rules.mutate.foreach.context.imageRegistry.withReference

withReference(reference)

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

obj spec.rules.mutate.foreach.context.imageRegistry.imageRegistryCredentials

"ImageRegistryCredentials provides credentials that will be used for authentication with registry"

fn spec.rules.mutate.foreach.context.imageRegistry.imageRegistryCredentials.withAllowInsecureRegistry

withAllowInsecureRegistry(allowInsecureRegistry)

"AllowInsecureRegistry allows insecure access to a registry."

fn spec.rules.mutate.foreach.context.imageRegistry.imageRegistryCredentials.withProviders

withProviders(providers)

"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."

fn spec.rules.mutate.foreach.context.imageRegistry.imageRegistryCredentials.withProvidersMixin

withProvidersMixin(providers)

"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."

Note: This function appends passed data to existing values

fn spec.rules.mutate.foreach.context.imageRegistry.imageRegistryCredentials.withSecrets

withSecrets(secrets)

"Secrets specifies a list of secrets that are provided for credentials. Secrets must live in the Kyverno namespace."

fn spec.rules.mutate.foreach.context.imageRegistry.imageRegistryCredentials.withSecretsMixin

withSecretsMixin(secrets)

"Secrets specifies a list of secrets that are provided for credentials. Secrets must live in the Kyverno namespace."

Note: This function appends passed data to existing values

obj spec.rules.mutate.foreach.context.variable

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

fn spec.rules.mutate.foreach.context.variable.withDefault

withDefault(default)

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

fn spec.rules.mutate.foreach.context.variable.withJmesPath

withJmesPath(jmesPath)

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

fn spec.rules.mutate.foreach.context.variable.withValue

withValue(value)

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

obj spec.rules.mutate.foreach.preconditions

"AnyAllConditions are used to determine if a policy rule should be applied by evaluating a set of conditions. The declaration can contain nested any or all statements. See: https://kyverno.io/docs/writing-policies/preconditions/"

fn spec.rules.mutate.foreach.preconditions.withAll

withAll(all)

"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"

fn spec.rules.mutate.foreach.preconditions.withAllMixin

withAllMixin(all)

"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"

Note: This function appends passed data to existing values

fn spec.rules.mutate.foreach.preconditions.withAny

withAny(any)

"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"

fn spec.rules.mutate.foreach.preconditions.withAnyMixin

withAnyMixin(any)

"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"

Note: This function appends passed data to existing values

obj spec.rules.mutate.foreach.preconditions.all

"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"

fn spec.rules.mutate.foreach.preconditions.all.withKey

withKey(key)

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

fn spec.rules.mutate.foreach.preconditions.all.withMessage

withMessage(message)

"Message is an optional display message"

fn spec.rules.mutate.foreach.preconditions.all.withOperator

withOperator(operator)

"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"

fn spec.rules.mutate.foreach.preconditions.all.withValue

withValue(value)

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

obj spec.rules.mutate.foreach.preconditions.any

"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"

fn spec.rules.mutate.foreach.preconditions.any.withKey

withKey(key)

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

fn spec.rules.mutate.foreach.preconditions.any.withMessage

withMessage(message)

"Message is an optional display message"

fn spec.rules.mutate.foreach.preconditions.any.withOperator

withOperator(operator)

"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"

fn spec.rules.mutate.foreach.preconditions.any.withValue

withValue(value)

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

obj spec.rules.mutate.targets

"Targets defines the target resources to be mutated."

fn spec.rules.mutate.targets.withApiVersion

withApiVersion(apiVersion)

"APIVersion specifies resource apiVersion."

fn spec.rules.mutate.targets.withContext

withContext(context)

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

fn spec.rules.mutate.targets.withContextMixin

withContextMixin(context)

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

Note: This function appends passed data to existing values

fn spec.rules.mutate.targets.withKind

withKind(kind)

"Kind specifies resource kind."

fn spec.rules.mutate.targets.withName

withName(name)

"Name specifies the resource name."

fn spec.rules.mutate.targets.withNamespace

withNamespace(namespace)

"Namespace specifies resource namespace."

fn spec.rules.mutate.targets.withPreconditions

withPreconditions(preconditions)

"Preconditions are used to determine if a policy rule should be applied by evaluating a set of conditions. The declaration can contain nested any or all statements. A direct list of conditions (without any or all statements is supported for backwards compatibility but will be deprecated in the next major release. See: https://kyverno.io/docs/writing-policies/preconditions/"

fn spec.rules.mutate.targets.withUid

withUid(uid)

"UID specifies the resource uid."

obj spec.rules.mutate.targets.context

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

fn spec.rules.mutate.targets.context.withName

withName(name)

"Name is the variable name."

obj spec.rules.mutate.targets.context.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."

fn spec.rules.mutate.targets.context.apiCall.withData

withData(data)

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

fn spec.rules.mutate.targets.context.apiCall.withDataMixin

withDataMixin(data)

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

Note: This function appends passed data to existing values

fn spec.rules.mutate.targets.context.apiCall.withJmesPath

withJmesPath(jmesPath)

"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."

fn spec.rules.mutate.targets.context.apiCall.withMethod

withMethod(method)

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

fn spec.rules.mutate.targets.context.apiCall.withUrlPath

withUrlPath(urlPath)

"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."

obj spec.rules.mutate.targets.context.apiCall.data

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

fn spec.rules.mutate.targets.context.apiCall.data.withKey

withKey(key)

"Key is a unique identifier for the data value"

fn spec.rules.mutate.targets.context.apiCall.data.withValue

withValue(value)

"Value is the data value"

obj spec.rules.mutate.targets.context.apiCall.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."

fn spec.rules.mutate.targets.context.apiCall.service.withCaBundle

withCaBundle(caBundle)

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

fn spec.rules.mutate.targets.context.apiCall.service.withUrl

withUrl(url)

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

obj spec.rules.mutate.targets.context.configMap

"ConfigMap is the ConfigMap reference."

fn spec.rules.mutate.targets.context.configMap.withName

withName(name)

"Name is the ConfigMap name."

fn spec.rules.mutate.targets.context.configMap.withNamespace

withNamespace(namespace)

"Namespace is the ConfigMap namespace."

obj spec.rules.mutate.targets.context.globalReference

"GlobalContextEntryReference is a reference to a cached global context entry."

fn spec.rules.mutate.targets.context.globalReference.withJmesPath

withJmesPath(jmesPath)

"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."

fn spec.rules.mutate.targets.context.globalReference.withName

withName(name)

"Name of the global context entry"

obj spec.rules.mutate.targets.context.imageRegistry

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

fn spec.rules.mutate.targets.context.imageRegistry.withJmesPath

withJmesPath(jmesPath)

"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."

fn spec.rules.mutate.targets.context.imageRegistry.withReference

withReference(reference)

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

obj spec.rules.mutate.targets.context.imageRegistry.imageRegistryCredentials

"ImageRegistryCredentials provides credentials that will be used for authentication with registry"

fn spec.rules.mutate.targets.context.imageRegistry.imageRegistryCredentials.withAllowInsecureRegistry

withAllowInsecureRegistry(allowInsecureRegistry)

"AllowInsecureRegistry allows insecure access to a registry."

fn spec.rules.mutate.targets.context.imageRegistry.imageRegistryCredentials.withProviders

withProviders(providers)

"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."

fn spec.rules.mutate.targets.context.imageRegistry.imageRegistryCredentials.withProvidersMixin

withProvidersMixin(providers)

"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."

Note: This function appends passed data to existing values

fn spec.rules.mutate.targets.context.imageRegistry.imageRegistryCredentials.withSecrets

withSecrets(secrets)

"Secrets specifies a list of secrets that are provided for credentials. Secrets must live in the Kyverno namespace."

fn spec.rules.mutate.targets.context.imageRegistry.imageRegistryCredentials.withSecretsMixin

withSecretsMixin(secrets)

"Secrets specifies a list of secrets that are provided for credentials. Secrets must live in the Kyverno namespace."

Note: This function appends passed data to existing values

obj spec.rules.mutate.targets.context.variable

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

fn spec.rules.mutate.targets.context.variable.withDefault

withDefault(default)

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

fn spec.rules.mutate.targets.context.variable.withJmesPath

withJmesPath(jmesPath)

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

fn spec.rules.mutate.targets.context.variable.withValue

withValue(value)

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

obj spec.rules.validate

"Validation is used to validate matching resources."

fn spec.rules.validate.withAnyPattern

withAnyPattern(anyPattern)

"AnyPattern specifies list of validation patterns. At least one of the patterns must be satisfied for the validation rule to succeed."

fn spec.rules.validate.withForeach

withForeach(foreach)

"ForEach applies validate rules to a list of sub-elements by creating a context for each entry in the list and looping over it to apply the specified logic."

fn spec.rules.validate.withForeachMixin

withForeachMixin(foreach)

"ForEach applies validate rules to a list of sub-elements by creating a context for each entry in the list and looping over it to apply the specified logic."

Note: This function appends passed data to existing values

fn spec.rules.validate.withMessage

withMessage(message)

"Message specifies a custom message to be displayed on failure."

fn spec.rules.validate.withPattern

withPattern(pattern)

"Pattern specifies an overlay-style pattern used to check resources."

obj spec.rules.validate.cel

"CEL allows validation checks using the Common Expression Language (https://kubernetes.io/docs/reference/using-api/cel/)."

fn spec.rules.validate.cel.withAuditAnnotations

withAuditAnnotations(auditAnnotations)

"AuditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request."

fn spec.rules.validate.cel.withAuditAnnotationsMixin

withAuditAnnotationsMixin(auditAnnotations)

"AuditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request."

Note: This function appends passed data to existing values

fn spec.rules.validate.cel.withExpressions

withExpressions(expressions)

"Expressions is a list of CELExpression types."

fn spec.rules.validate.cel.withExpressionsMixin

withExpressionsMixin(expressions)

"Expressions is a list of CELExpression types."

Note: This function appends passed data to existing values

fn spec.rules.validate.cel.withVariables

withVariables(variables)

"Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under variables in other expressions of the policy."

fn spec.rules.validate.cel.withVariablesMixin

withVariablesMixin(variables)

"Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under variables in other expressions of the policy."

Note: This function appends passed data to existing values

obj spec.rules.validate.cel.auditAnnotations

"AuditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request."

fn spec.rules.validate.cel.auditAnnotations.withKey

withKey(key)

"key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. \n The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\". \n If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded. \n Required."

fn spec.rules.validate.cel.auditAnnotations.withValueExpression

withValueExpression(valueExpression)

"valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb. \n If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list. \n Required."

obj spec.rules.validate.cel.expressions

"Expressions is a list of CELExpression types."

fn spec.rules.validate.cel.expressions.withExpression

withExpression(expression)

"Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: \n - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request(ref). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. \n The apiVersion, kind, metadata.name and metadata.generateName are always accessible from the root of the object. No other metadata properties are accessible. \n Only property names of the form [a-zA-Z_.-/][a-zA-Z0-9_.-/]* are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '' escapes to '__underscores' - '.' escapes to 'dot' - '-' escapes to 'dash' - '/' escapes to 'slash' - Property names that exactly match a CEL RESERVED keyword escape to '{keyword}'. The keywords are: \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\", \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples: - Expression accessing a property named \"namespace\": {\"Expression\": \"object.namespace > 0\"} - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"} - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"} \n Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': X + Y performs a union where the array positions of all elements in X are preserved and non-intersecting elements in Y are appended, retaining their partial order. - 'map': X + Y performs a merge where the array positions of all keys in X are preserved but the values are overwritten by values in Y when the key sets of X and Y intersect. Elements in Y with non-intersecting keys are appended, retaining their partial order. Required."

fn spec.rules.validate.cel.expressions.withMessage

withMessage(message)

"Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\"."

fn spec.rules.validate.cel.expressions.withMessageExpression

withMessageExpression(messageExpression)

"messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the expression except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\

fn spec.rules.validate.cel.expressions.withReason

withReason(reason)

"Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client."

obj spec.rules.validate.cel.paramKind

"ParamKind is a tuple of Group Kind and Version."

fn spec.rules.validate.cel.paramKind.withApiVersion

withApiVersion(apiVersion)

"APIVersion is the API group version the resources belong to. In format of \"group/version\". Required."

fn spec.rules.validate.cel.paramKind.withKind

withKind(kind)

"Kind is the API kind the resources belong to. Required."

obj spec.rules.validate.cel.paramRef

"ParamRef references a parameter resource."

fn spec.rules.validate.cel.paramRef.withName

withName(name)

"name is the name of the resource being referenced. \n name and selector are mutually exclusive properties. If one is set, the other must be unset."

fn spec.rules.validate.cel.paramRef.withNamespace

withNamespace(namespace)

"namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both name and selector fields. \n A per-namespace parameter may be used by specifying a namespace-scoped paramKind in the policy and leaving this field empty. \n - If paramKind is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. \n - If paramKind is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error."

fn spec.rules.validate.cel.paramRef.withParameterNotFoundAction

withParameterNotFoundAction(parameterNotFoundAction)

"parameterNotFoundAction controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to Allow, then no matched parameters will be treated as successful validation by the binding. If set to Deny, then no matched parameters will be subject to the failurePolicy of the policy. \n Allowed values are Allow or Deny Default to Deny"

obj spec.rules.validate.cel.paramRef.selector

"selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind. \n If multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together. \n One of name or selector must be set, but name and selector are mutually exclusive properties. If one is set, the other must be unset."

fn spec.rules.validate.cel.paramRef.selector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.rules.validate.cel.paramRef.selector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.rules.validate.cel.paramRef.selector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.rules.validate.cel.paramRef.selector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.rules.validate.cel.paramRef.selector.matchExpressions

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

fn spec.rules.validate.cel.paramRef.selector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.rules.validate.cel.paramRef.selector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.rules.validate.cel.paramRef.selector.matchExpressions.withValues

withValues(values)

"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."

fn spec.rules.validate.cel.paramRef.selector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.rules.validate.cel.variables

"Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under variables in other expressions of the policy."

fn spec.rules.validate.cel.variables.withExpression

withExpression(expression)

"Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation."

fn spec.rules.validate.cel.variables.withName

withName(name)

"Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through variables For example, if name is \"foo\", the variable will be available as variables.foo"

obj spec.rules.validate.deny

"Deny defines conditions used to pass or fail a validation rule."

fn spec.rules.validate.deny.withConditions

withConditions(conditions)

"Multiple conditions can be declared under an any or all statement. A direct list of conditions (without any or all statements) is also supported for backwards compatibility but will be deprecated in the next major release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules"

obj spec.rules.validate.foreach

"ForEach applies validate rules to a list of sub-elements by creating a context for each entry in the list and looping over it to apply the specified logic."

fn spec.rules.validate.foreach.withAnyPattern

withAnyPattern(anyPattern)

"AnyPattern specifies list of validation patterns. At least one of the patterns must be satisfied for the validation rule to succeed."

fn spec.rules.validate.foreach.withContext

withContext(context)

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

fn spec.rules.validate.foreach.withContextMixin

withContextMixin(context)

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

Note: This function appends passed data to existing values

fn spec.rules.validate.foreach.withElementScope

withElementScope(elementScope)

"ElementScope specifies whether to use the current list element as the scope for validation. Defaults to \"true\" if not specified. When set to \"false\", \"request.object\" is used as the validation scope within the foreach block to allow referencing other elements in the subtree."

fn spec.rules.validate.foreach.withForeach

withForeach(foreach)

"Foreach declares a nested foreach iterator"

fn spec.rules.validate.foreach.withList

withList(list)

"List specifies a JMESPath expression that results in one or more elements to which the validation logic is applied."

fn spec.rules.validate.foreach.withPattern

withPattern(pattern)

"Pattern specifies an overlay-style pattern used to check resources."

obj spec.rules.validate.foreach.context

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

fn spec.rules.validate.foreach.context.withName

withName(name)

"Name is the variable name."

obj spec.rules.validate.foreach.context.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."

fn spec.rules.validate.foreach.context.apiCall.withData

withData(data)

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

fn spec.rules.validate.foreach.context.apiCall.withDataMixin

withDataMixin(data)

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

Note: This function appends passed data to existing values

fn spec.rules.validate.foreach.context.apiCall.withJmesPath

withJmesPath(jmesPath)

"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."

fn spec.rules.validate.foreach.context.apiCall.withMethod

withMethod(method)

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

fn spec.rules.validate.foreach.context.apiCall.withUrlPath

withUrlPath(urlPath)

"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."

obj spec.rules.validate.foreach.context.apiCall.data

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

fn spec.rules.validate.foreach.context.apiCall.data.withKey

withKey(key)

"Key is a unique identifier for the data value"

fn spec.rules.validate.foreach.context.apiCall.data.withValue

withValue(value)

"Value is the data value"

obj spec.rules.validate.foreach.context.apiCall.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."

fn spec.rules.validate.foreach.context.apiCall.service.withCaBundle

withCaBundle(caBundle)

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

fn spec.rules.validate.foreach.context.apiCall.service.withUrl

withUrl(url)

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

obj spec.rules.validate.foreach.context.configMap

"ConfigMap is the ConfigMap reference."

fn spec.rules.validate.foreach.context.configMap.withName

withName(name)

"Name is the ConfigMap name."

fn spec.rules.validate.foreach.context.configMap.withNamespace

withNamespace(namespace)

"Namespace is the ConfigMap namespace."

obj spec.rules.validate.foreach.context.globalReference

"GlobalContextEntryReference is a reference to a cached global context entry."

fn spec.rules.validate.foreach.context.globalReference.withJmesPath

withJmesPath(jmesPath)

"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."

fn spec.rules.validate.foreach.context.globalReference.withName

withName(name)

"Name of the global context entry"

obj spec.rules.validate.foreach.context.imageRegistry

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

fn spec.rules.validate.foreach.context.imageRegistry.withJmesPath

withJmesPath(jmesPath)

"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."

fn spec.rules.validate.foreach.context.imageRegistry.withReference

withReference(reference)

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

obj spec.rules.validate.foreach.context.imageRegistry.imageRegistryCredentials

"ImageRegistryCredentials provides credentials that will be used for authentication with registry"

fn spec.rules.validate.foreach.context.imageRegistry.imageRegistryCredentials.withAllowInsecureRegistry

withAllowInsecureRegistry(allowInsecureRegistry)

"AllowInsecureRegistry allows insecure access to a registry."

fn spec.rules.validate.foreach.context.imageRegistry.imageRegistryCredentials.withProviders

withProviders(providers)

"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."

fn spec.rules.validate.foreach.context.imageRegistry.imageRegistryCredentials.withProvidersMixin

withProvidersMixin(providers)

"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."

Note: This function appends passed data to existing values

fn spec.rules.validate.foreach.context.imageRegistry.imageRegistryCredentials.withSecrets

withSecrets(secrets)

"Secrets specifies a list of secrets that are provided for credentials. Secrets must live in the Kyverno namespace."

fn spec.rules.validate.foreach.context.imageRegistry.imageRegistryCredentials.withSecretsMixin

withSecretsMixin(secrets)

"Secrets specifies a list of secrets that are provided for credentials. Secrets must live in the Kyverno namespace."

Note: This function appends passed data to existing values

obj spec.rules.validate.foreach.context.variable

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

fn spec.rules.validate.foreach.context.variable.withDefault

withDefault(default)

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

fn spec.rules.validate.foreach.context.variable.withJmesPath

withJmesPath(jmesPath)

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

fn spec.rules.validate.foreach.context.variable.withValue

withValue(value)

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

obj spec.rules.validate.foreach.deny

"Deny defines conditions used to pass or fail a validation rule."

fn spec.rules.validate.foreach.deny.withConditions

withConditions(conditions)

"Multiple conditions can be declared under an any or all statement. A direct list of conditions (without any or all statements) is also supported for backwards compatibility but will be deprecated in the next major release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules"

obj spec.rules.validate.foreach.preconditions

"AnyAllConditions are used to determine if a policy rule should be applied by evaluating a set of conditions. The declaration can contain nested any or all statements. See: https://kyverno.io/docs/writing-policies/preconditions/"

fn spec.rules.validate.foreach.preconditions.withAll

withAll(all)

"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"

fn spec.rules.validate.foreach.preconditions.withAllMixin

withAllMixin(all)

"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"

Note: This function appends passed data to existing values

fn spec.rules.validate.foreach.preconditions.withAny

withAny(any)

"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"

fn spec.rules.validate.foreach.preconditions.withAnyMixin

withAnyMixin(any)

"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"

Note: This function appends passed data to existing values

obj spec.rules.validate.foreach.preconditions.all

"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"

fn spec.rules.validate.foreach.preconditions.all.withKey

withKey(key)

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

fn spec.rules.validate.foreach.preconditions.all.withMessage

withMessage(message)

"Message is an optional display message"

fn spec.rules.validate.foreach.preconditions.all.withOperator

withOperator(operator)

"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"

fn spec.rules.validate.foreach.preconditions.all.withValue

withValue(value)

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

obj spec.rules.validate.foreach.preconditions.any

"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"

fn spec.rules.validate.foreach.preconditions.any.withKey

withKey(key)

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

fn spec.rules.validate.foreach.preconditions.any.withMessage

withMessage(message)

"Message is an optional display message"

fn spec.rules.validate.foreach.preconditions.any.withOperator

withOperator(operator)

"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"

fn spec.rules.validate.foreach.preconditions.any.withValue

withValue(value)

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

obj spec.rules.validate.manifests

"Manifest specifies conditions for manifest verification"

fn spec.rules.validate.manifests.withAnnotationDomain

withAnnotationDomain(annotationDomain)

"AnnotationDomain is custom domain of annotation for message and signature. Default is \"cosign.sigstore.dev\"."

fn spec.rules.validate.manifests.withAttestors

withAttestors(attestors)

"Attestors specified the required attestors (i.e. authorities)"

fn spec.rules.validate.manifests.withAttestorsMixin

withAttestorsMixin(attestors)

"Attestors specified the required attestors (i.e. authorities)"

Note: This function appends passed data to existing values

fn spec.rules.validate.manifests.withIgnoreFields

withIgnoreFields(ignoreFields)

"Fields which will be ignored while comparing manifests."

fn spec.rules.validate.manifests.withIgnoreFieldsMixin

withIgnoreFieldsMixin(ignoreFields)

"Fields which will be ignored while comparing manifests."

Note: This function appends passed data to existing values

fn spec.rules.validate.manifests.withRepository

withRepository(repository)

"Repository is an optional alternate OCI repository to use for resource bundle reference. The repository can be overridden per Attestor or Attestation."

obj spec.rules.validate.manifests.attestors

"Attestors specified the required attestors (i.e. authorities)"

fn spec.rules.validate.manifests.attestors.withCount

withCount(count)

"Count specifies the required number of entries that must match. If the count is null, all entries must match (a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a value N, then N must be less than or equal to the size of entries, and at least N entries must match."

fn spec.rules.validate.manifests.attestors.withEntries

withEntries(entries)

"Entries contains the available attestors. An attestor can be a static key, attributes for keyless verification, or a nested attestor declaration."

fn spec.rules.validate.manifests.attestors.withEntriesMixin

withEntriesMixin(entries)

"Entries contains the available attestors. An attestor can be a static key, attributes for keyless verification, or a nested attestor declaration."

Note: This function appends passed data to existing values

obj spec.rules.validate.manifests.attestors.entries

"Entries contains the available attestors. An attestor can be a static key, attributes for keyless verification, or a nested attestor declaration."

fn spec.rules.validate.manifests.attestors.entries.withAnnotations

withAnnotations(annotations)

"Annotations are used for image verification. Every specified key-value pair must exist and match in the verified payload. The payload may contain other key-value pairs."

fn spec.rules.validate.manifests.attestors.entries.withAnnotationsMixin

withAnnotationsMixin(annotations)

"Annotations are used for image verification. Every specified key-value pair must exist and match in the verified payload. The payload may contain other key-value pairs."

Note: This function appends passed data to existing values

fn spec.rules.validate.manifests.attestors.entries.withAttestor

withAttestor(attestor)

"Attestor is a nested set of Attestor used to specify a more complex set of match authorities."

fn spec.rules.validate.manifests.attestors.entries.withRepository

withRepository(repository)

"Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule. If specified Repository will override other OCI image repository locations for this Attestor."

obj spec.rules.validate.manifests.attestors.entries.certificates

"Certificates specifies one or more certificates."

fn spec.rules.validate.manifests.attestors.entries.certificates.withCert

withCert(cert)

"Cert is an optional PEM-encoded public certificate."

fn spec.rules.validate.manifests.attestors.entries.certificates.withCertChain

withCertChain(certChain)

"CertChain is an optional PEM encoded set of certificates used to verify."

obj spec.rules.validate.manifests.attestors.entries.certificates.ctlog

"CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate Timestamps (SCTs). If the value is unset, the default behavior by Cosign is used."

fn spec.rules.validate.manifests.attestors.entries.certificates.ctlog.withIgnoreSCT

withIgnoreSCT(ignoreSCT)

"IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate timestamp. Default is false. Set to true if this was opted out during signing."

fn spec.rules.validate.manifests.attestors.entries.certificates.ctlog.withPubkey

withPubkey(pubkey)

"PubKey, if set, is used to validate SCTs against a custom source."

obj spec.rules.validate.manifests.attestors.entries.certificates.rekor

"Rekor provides configuration for the Rekor transparency log service. If an empty object is provided the public instance of Rekor (https://rekor.sigstore.dev) is used."

fn spec.rules.validate.manifests.attestors.entries.certificates.rekor.withIgnoreTlog

withIgnoreTlog(ignoreTlog)

"IgnoreTlog skips transparency log verification."

fn spec.rules.validate.manifests.attestors.entries.certificates.rekor.withPubkey

withPubkey(pubkey)

"RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor. If set, this will be used to validate transparency log signatures from a custom Rekor."

fn spec.rules.validate.manifests.attestors.entries.certificates.rekor.withUrl

withUrl(url)

"URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."

obj spec.rules.validate.manifests.attestors.entries.keyless

"Keyless is a set of attribute used to verify a Sigstore keyless attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md."

fn spec.rules.validate.manifests.attestors.entries.keyless.withAdditionalExtensions

withAdditionalExtensions(additionalExtensions)

"AdditionalExtensions are certificate-extensions used for keyless signing."

fn spec.rules.validate.manifests.attestors.entries.keyless.withAdditionalExtensionsMixin

withAdditionalExtensionsMixin(additionalExtensions)

"AdditionalExtensions are certificate-extensions used for keyless signing."

Note: This function appends passed data to existing values

fn spec.rules.validate.manifests.attestors.entries.keyless.withIssuer

withIssuer(issuer)

"Issuer is the certificate issuer used for keyless signing."

fn spec.rules.validate.manifests.attestors.entries.keyless.withRoots

withRoots(roots)

"Roots is an optional set of PEM encoded trusted root certificates. If not provided, the system roots are used."

fn spec.rules.validate.manifests.attestors.entries.keyless.withSubject

withSubject(subject)

"Subject is the verified identity used for keyless signing, for example the email address."

obj spec.rules.validate.manifests.attestors.entries.keyless.ctlog

"CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate Timestamps (SCTs). If the value is unset, the default behavior by Cosign is used."

fn spec.rules.validate.manifests.attestors.entries.keyless.ctlog.withIgnoreSCT

withIgnoreSCT(ignoreSCT)

"IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate timestamp. Default is false. Set to true if this was opted out during signing."

fn spec.rules.validate.manifests.attestors.entries.keyless.ctlog.withPubkey

withPubkey(pubkey)

"PubKey, if set, is used to validate SCTs against a custom source."

obj spec.rules.validate.manifests.attestors.entries.keyless.rekor

"Rekor provides configuration for the Rekor transparency log service. If an empty object is provided the public instance of Rekor (https://rekor.sigstore.dev) is used."

fn spec.rules.validate.manifests.attestors.entries.keyless.rekor.withIgnoreTlog

withIgnoreTlog(ignoreTlog)

"IgnoreTlog skips transparency log verification."

fn spec.rules.validate.manifests.attestors.entries.keyless.rekor.withPubkey

withPubkey(pubkey)

"RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor. If set, this will be used to validate transparency log signatures from a custom Rekor."

fn spec.rules.validate.manifests.attestors.entries.keyless.rekor.withUrl

withUrl(url)

"URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."

obj spec.rules.validate.manifests.attestors.entries.keys

"Keys specifies one or more public keys."

fn spec.rules.validate.manifests.attestors.entries.keys.withKms

withKms(kms)

"KMS provides the URI to the public key stored in a Key Management System. See: https://github.com/sigstore/cosign/blob/main/KMS.md"

fn spec.rules.validate.manifests.attestors.entries.keys.withPublicKeys

withPublicKeys(publicKeys)

"Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly specified or can be a variable reference to a key specified in a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret elsewhere in the cluster by specifying it in the format \"k8s:///\". The named Secret must specify a key cosign.pub containing the public key used for verification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret). When multiple keys are specified each key is processed as a separate staticKey entry (.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."

fn spec.rules.validate.manifests.attestors.entries.keys.withSignatureAlgorithm

withSignatureAlgorithm(signatureAlgorithm)

"Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."

obj spec.rules.validate.manifests.attestors.entries.keys.ctlog

"CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate Timestamps (SCTs). If the value is unset, the default behavior by Cosign is used."

fn spec.rules.validate.manifests.attestors.entries.keys.ctlog.withIgnoreSCT

withIgnoreSCT(ignoreSCT)

"IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate timestamp. Default is false. Set to true if this was opted out during signing."

fn spec.rules.validate.manifests.attestors.entries.keys.ctlog.withPubkey

withPubkey(pubkey)

"PubKey, if set, is used to validate SCTs against a custom source."

obj spec.rules.validate.manifests.attestors.entries.keys.rekor

"Rekor provides configuration for the Rekor transparency log service. If an empty object is provided the public instance of Rekor (https://rekor.sigstore.dev) is used."

fn spec.rules.validate.manifests.attestors.entries.keys.rekor.withIgnoreTlog

withIgnoreTlog(ignoreTlog)

"IgnoreTlog skips transparency log verification."

fn spec.rules.validate.manifests.attestors.entries.keys.rekor.withPubkey

withPubkey(pubkey)

"RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor. If set, this will be used to validate transparency log signatures from a custom Rekor."

fn spec.rules.validate.manifests.attestors.entries.keys.rekor.withUrl

withUrl(url)

"URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."

obj spec.rules.validate.manifests.attestors.entries.keys.secret

"Reference to a Secret resource that contains a public key"

fn spec.rules.validate.manifests.attestors.entries.keys.secret.withName

withName(name)

"Name of the secret. The provided secret must contain a key named cosign.pub."

fn spec.rules.validate.manifests.attestors.entries.keys.secret.withNamespace

withNamespace(namespace)

"Namespace name where the Secret exists."

obj spec.rules.validate.manifests.dryRun

"DryRun configuration"

fn spec.rules.validate.manifests.dryRun.withEnable

withEnable(enable)

fn spec.rules.validate.manifests.dryRun.withNamespace

withNamespace(namespace)

obj spec.rules.validate.manifests.ignoreFields

"Fields which will be ignored while comparing manifests."

fn spec.rules.validate.manifests.ignoreFields.withFields

withFields(fields)

fn spec.rules.validate.manifests.ignoreFields.withFieldsMixin

withFieldsMixin(fields)

Note: This function appends passed data to existing values

fn spec.rules.validate.manifests.ignoreFields.withObjects

withObjects(objects)

fn spec.rules.validate.manifests.ignoreFields.withObjectsMixin

withObjectsMixin(objects)

Note: This function appends passed data to existing values

obj spec.rules.validate.manifests.ignoreFields.objects

fn spec.rules.validate.manifests.ignoreFields.objects.withGroup

withGroup(group)

fn spec.rules.validate.manifests.ignoreFields.objects.withKind

withKind(kind)

fn spec.rules.validate.manifests.ignoreFields.objects.withName

withName(name)

fn spec.rules.validate.manifests.ignoreFields.objects.withNamespace

withNamespace(namespace)

fn spec.rules.validate.manifests.ignoreFields.objects.withVersion

withVersion(version)

obj spec.rules.validate.podSecurity

"PodSecurity applies exemptions for Kubernetes Pod Security admission by specifying exclusions for Pod Security Standards controls."

fn spec.rules.validate.podSecurity.withExclude

withExclude(exclude)

"Exclude specifies the Pod Security Standard controls to be excluded."

fn spec.rules.validate.podSecurity.withExcludeMixin

withExcludeMixin(exclude)

"Exclude specifies the Pod Security Standard controls to be excluded."

Note: This function appends passed data to existing values

fn spec.rules.validate.podSecurity.withLevel

withLevel(level)

"Level defines the Pod Security Standard level to be applied to workloads. Allowed values are privileged, baseline, and restricted."

fn spec.rules.validate.podSecurity.withVersion

withVersion(version)

"Version defines the Pod Security Standard versions that Kubernetes supports. Allowed values are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, v1.26, v1.27, v1.28, v1.29, latest. Defaults to latest."

obj spec.rules.validate.podSecurity.exclude

"Exclude specifies the Pod Security Standard controls to be excluded."

fn spec.rules.validate.podSecurity.exclude.withControlName

withControlName(controlName)

"ControlName specifies the name of the Pod Security Standard control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/"

fn spec.rules.validate.podSecurity.exclude.withImages

withImages(images)

"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."

fn spec.rules.validate.podSecurity.exclude.withImagesMixin

withImagesMixin(images)

"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."

Note: This function appends passed data to existing values

fn spec.rules.validate.podSecurity.exclude.withRestrictedField

withRestrictedField(restrictedField)

"RestrictedField selects the field for the given Pod Security Standard control. When not set, all restricted fields for the control are selected."

fn spec.rules.validate.podSecurity.exclude.withValues

withValues(values)

"Values defines the allowed values that can be excluded."

fn spec.rules.validate.podSecurity.exclude.withValuesMixin

withValuesMixin(values)

"Values defines the allowed values that can be excluded."

Note: This function appends passed data to existing values

obj spec.rules.verifyImages

"VerifyImages is used to verify image signatures and mutate them to add a digest"

fn spec.rules.verifyImages.withAdditionalExtensions

withAdditionalExtensions(additionalExtensions)

"Deprecated."

fn spec.rules.verifyImages.withAdditionalExtensionsMixin

withAdditionalExtensionsMixin(additionalExtensions)

"Deprecated."

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.withAnnotations

withAnnotations(annotations)

"Deprecated. Use annotations per Attestor instead."

fn spec.rules.verifyImages.withAnnotationsMixin

withAnnotationsMixin(annotations)

"Deprecated. Use annotations per Attestor instead."

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.withAttestations

withAttestations(attestations)

"Attestations are optional checks for signed in-toto Statements used to verify the image. See https://github.com/in-toto/attestation. Kyverno fetches signed attestations from the OCI registry and decodes them into a list of Statement declarations."

fn spec.rules.verifyImages.withAttestationsMixin

withAttestationsMixin(attestations)

"Attestations are optional checks for signed in-toto Statements used to verify the image. See https://github.com/in-toto/attestation. Kyverno fetches signed attestations from the OCI registry and decodes them into a list of Statement declarations."

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.withAttestors

withAttestors(attestors)

"Attestors specified the required attestors (i.e. authorities)"

fn spec.rules.verifyImages.withAttestorsMixin

withAttestorsMixin(attestors)

"Attestors specified the required attestors (i.e. authorities)"

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.withImage

withImage(image)

"Deprecated. Use ImageReferences instead."

fn spec.rules.verifyImages.withImageReferences

withImageReferences(imageReferences)

"ImageReferences is a list of matching image reference patterns. At least one pattern in the list must match the image for the rule to apply. Each image reference consists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest). Wildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."

fn spec.rules.verifyImages.withImageReferencesMixin

withImageReferencesMixin(imageReferences)

"ImageReferences is a list of matching image reference patterns. At least one pattern in the list must match the image for the rule to apply. Each image reference consists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest). Wildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.withIssuer

withIssuer(issuer)

"Deprecated. Use KeylessAttestor instead."

fn spec.rules.verifyImages.withKey

withKey(key)

"Deprecated. Use StaticKeyAttestor instead."

fn spec.rules.verifyImages.withMutateDigest

withMutateDigest(mutateDigest)

"MutateDigest enables replacement of image tags with digests. Defaults to true."

fn spec.rules.verifyImages.withRepository

withRepository(repository)

"Repository is an optional alternate OCI repository to use for image signatures and attestations that match this rule. If specified Repository will override the default OCI image repository configured for the installation. The repository can also be overridden per Attestor or Attestation."

fn spec.rules.verifyImages.withRequired

withRequired(required)

"Required validates that images are verified i.e. have matched passed a signature or attestation check."

fn spec.rules.verifyImages.withRoots

withRoots(roots)

"Deprecated. Use KeylessAttestor instead."

fn spec.rules.verifyImages.withSkipImageReferences

withSkipImageReferences(skipImageReferences)

"SkipImageReferences is a list of matching image reference patterns that should be skipped. At least one pattern in the list must match the image for the rule to be skipped. Each image reference consists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest). Wildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."

fn spec.rules.verifyImages.withSkipImageReferencesMixin

withSkipImageReferencesMixin(skipImageReferences)

"SkipImageReferences is a list of matching image reference patterns that should be skipped. At least one pattern in the list must match the image for the rule to be skipped. Each image reference consists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest). Wildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.withSubject

withSubject(subject)

"Deprecated. Use KeylessAttestor instead."

fn spec.rules.verifyImages.withType

withType(type)

"Type specifies the method of signature validation. The allowed options are Cosign and Notary. By default Cosign is used if a type is not specified."

fn spec.rules.verifyImages.withUseCache

withUseCache(useCache)

"UseCache enables caching of image verify responses for this rule."

fn spec.rules.verifyImages.withVerifyDigest

withVerifyDigest(verifyDigest)

"VerifyDigest validates that images have a digest."

obj spec.rules.verifyImages.attestations

"Attestations are optional checks for signed in-toto Statements used to verify the image. See https://github.com/in-toto/attestation. Kyverno fetches signed attestations from the OCI registry and decodes them into a list of Statement declarations."

fn spec.rules.verifyImages.attestations.withAttestors

withAttestors(attestors)

"Attestors specify the required attestors (i.e. authorities)."

fn spec.rules.verifyImages.attestations.withAttestorsMixin

withAttestorsMixin(attestors)

"Attestors specify the required attestors (i.e. authorities)."

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.attestations.withConditions

withConditions(conditions)

"Conditions are used to verify attributes within a Predicate. If no Conditions are specified the attestation check is satisfied as long there are predicates that match the predicate type."

fn spec.rules.verifyImages.attestations.withConditionsMixin

withConditionsMixin(conditions)

"Conditions are used to verify attributes within a Predicate. If no Conditions are specified the attestation check is satisfied as long there are predicates that match the predicate type."

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.attestations.withPredicateType

withPredicateType(predicateType)

"Deprecated in favour of 'Type', to be removed soon"

fn spec.rules.verifyImages.attestations.withType

withType(type)

"Type defines the type of attestation contained within the Statement."

obj spec.rules.verifyImages.attestations.attestors

"Attestors specify the required attestors (i.e. authorities)."

fn spec.rules.verifyImages.attestations.attestors.withCount

withCount(count)

"Count specifies the required number of entries that must match. If the count is null, all entries must match (a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a value N, then N must be less than or equal to the size of entries, and at least N entries must match."

fn spec.rules.verifyImages.attestations.attestors.withEntries

withEntries(entries)

"Entries contains the available attestors. An attestor can be a static key, attributes for keyless verification, or a nested attestor declaration."

fn spec.rules.verifyImages.attestations.attestors.withEntriesMixin

withEntriesMixin(entries)

"Entries contains the available attestors. An attestor can be a static key, attributes for keyless verification, or a nested attestor declaration."

Note: This function appends passed data to existing values

obj spec.rules.verifyImages.attestations.attestors.entries

"Entries contains the available attestors. An attestor can be a static key, attributes for keyless verification, or a nested attestor declaration."

fn spec.rules.verifyImages.attestations.attestors.entries.withAnnotations

withAnnotations(annotations)

"Annotations are used for image verification. Every specified key-value pair must exist and match in the verified payload. The payload may contain other key-value pairs."

fn spec.rules.verifyImages.attestations.attestors.entries.withAnnotationsMixin

withAnnotationsMixin(annotations)

"Annotations are used for image verification. Every specified key-value pair must exist and match in the verified payload. The payload may contain other key-value pairs."

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.attestations.attestors.entries.withAttestor

withAttestor(attestor)

"Attestor is a nested set of Attestor used to specify a more complex set of match authorities."

fn spec.rules.verifyImages.attestations.attestors.entries.withRepository

withRepository(repository)

"Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule. If specified Repository will override other OCI image repository locations for this Attestor."

obj spec.rules.verifyImages.attestations.attestors.entries.certificates

"Certificates specifies one or more certificates."

fn spec.rules.verifyImages.attestations.attestors.entries.certificates.withCert

withCert(cert)

"Cert is an optional PEM-encoded public certificate."

fn spec.rules.verifyImages.attestations.attestors.entries.certificates.withCertChain

withCertChain(certChain)

"CertChain is an optional PEM encoded set of certificates used to verify."

obj spec.rules.verifyImages.attestations.attestors.entries.certificates.ctlog

"CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate Timestamps (SCTs). If the value is unset, the default behavior by Cosign is used."

fn spec.rules.verifyImages.attestations.attestors.entries.certificates.ctlog.withIgnoreSCT

withIgnoreSCT(ignoreSCT)

"IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate timestamp. Default is false. Set to true if this was opted out during signing."

fn spec.rules.verifyImages.attestations.attestors.entries.certificates.ctlog.withPubkey

withPubkey(pubkey)

"PubKey, if set, is used to validate SCTs against a custom source."

obj spec.rules.verifyImages.attestations.attestors.entries.certificates.rekor

"Rekor provides configuration for the Rekor transparency log service. If an empty object is provided the public instance of Rekor (https://rekor.sigstore.dev) is used."

fn spec.rules.verifyImages.attestations.attestors.entries.certificates.rekor.withIgnoreTlog

withIgnoreTlog(ignoreTlog)

"IgnoreTlog skips transparency log verification."

fn spec.rules.verifyImages.attestations.attestors.entries.certificates.rekor.withPubkey

withPubkey(pubkey)

"RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor. If set, this will be used to validate transparency log signatures from a custom Rekor."

fn spec.rules.verifyImages.attestations.attestors.entries.certificates.rekor.withUrl

withUrl(url)

"URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."

obj spec.rules.verifyImages.attestations.attestors.entries.keyless

"Keyless is a set of attribute used to verify a Sigstore keyless attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md."

fn spec.rules.verifyImages.attestations.attestors.entries.keyless.withAdditionalExtensions

withAdditionalExtensions(additionalExtensions)

"AdditionalExtensions are certificate-extensions used for keyless signing."

fn spec.rules.verifyImages.attestations.attestors.entries.keyless.withAdditionalExtensionsMixin

withAdditionalExtensionsMixin(additionalExtensions)

"AdditionalExtensions are certificate-extensions used for keyless signing."

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.attestations.attestors.entries.keyless.withIssuer

withIssuer(issuer)

"Issuer is the certificate issuer used for keyless signing."

fn spec.rules.verifyImages.attestations.attestors.entries.keyless.withRoots

withRoots(roots)

"Roots is an optional set of PEM encoded trusted root certificates. If not provided, the system roots are used."

fn spec.rules.verifyImages.attestations.attestors.entries.keyless.withSubject

withSubject(subject)

"Subject is the verified identity used for keyless signing, for example the email address."

obj spec.rules.verifyImages.attestations.attestors.entries.keyless.ctlog

"CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate Timestamps (SCTs). If the value is unset, the default behavior by Cosign is used."

fn spec.rules.verifyImages.attestations.attestors.entries.keyless.ctlog.withIgnoreSCT

withIgnoreSCT(ignoreSCT)

"IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate timestamp. Default is false. Set to true if this was opted out during signing."

fn spec.rules.verifyImages.attestations.attestors.entries.keyless.ctlog.withPubkey

withPubkey(pubkey)

"PubKey, if set, is used to validate SCTs against a custom source."

obj spec.rules.verifyImages.attestations.attestors.entries.keyless.rekor

"Rekor provides configuration for the Rekor transparency log service. If an empty object is provided the public instance of Rekor (https://rekor.sigstore.dev) is used."

fn spec.rules.verifyImages.attestations.attestors.entries.keyless.rekor.withIgnoreTlog

withIgnoreTlog(ignoreTlog)

"IgnoreTlog skips transparency log verification."

fn spec.rules.verifyImages.attestations.attestors.entries.keyless.rekor.withPubkey

withPubkey(pubkey)

"RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor. If set, this will be used to validate transparency log signatures from a custom Rekor."

fn spec.rules.verifyImages.attestations.attestors.entries.keyless.rekor.withUrl

withUrl(url)

"URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."

obj spec.rules.verifyImages.attestations.attestors.entries.keys

"Keys specifies one or more public keys."

fn spec.rules.verifyImages.attestations.attestors.entries.keys.withKms

withKms(kms)

"KMS provides the URI to the public key stored in a Key Management System. See: https://github.com/sigstore/cosign/blob/main/KMS.md"

fn spec.rules.verifyImages.attestations.attestors.entries.keys.withPublicKeys

withPublicKeys(publicKeys)

"Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly specified or can be a variable reference to a key specified in a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret elsewhere in the cluster by specifying it in the format \"k8s:///\". The named Secret must specify a key cosign.pub containing the public key used for verification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret). When multiple keys are specified each key is processed as a separate staticKey entry (.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."

fn spec.rules.verifyImages.attestations.attestors.entries.keys.withSignatureAlgorithm

withSignatureAlgorithm(signatureAlgorithm)

"Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."

obj spec.rules.verifyImages.attestations.attestors.entries.keys.ctlog

"CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate Timestamps (SCTs). If the value is unset, the default behavior by Cosign is used."

fn spec.rules.verifyImages.attestations.attestors.entries.keys.ctlog.withIgnoreSCT

withIgnoreSCT(ignoreSCT)

"IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate timestamp. Default is false. Set to true if this was opted out during signing."

fn spec.rules.verifyImages.attestations.attestors.entries.keys.ctlog.withPubkey

withPubkey(pubkey)

"PubKey, if set, is used to validate SCTs against a custom source."

obj spec.rules.verifyImages.attestations.attestors.entries.keys.rekor

"Rekor provides configuration for the Rekor transparency log service. If an empty object is provided the public instance of Rekor (https://rekor.sigstore.dev) is used."

fn spec.rules.verifyImages.attestations.attestors.entries.keys.rekor.withIgnoreTlog

withIgnoreTlog(ignoreTlog)

"IgnoreTlog skips transparency log verification."

fn spec.rules.verifyImages.attestations.attestors.entries.keys.rekor.withPubkey

withPubkey(pubkey)

"RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor. If set, this will be used to validate transparency log signatures from a custom Rekor."

fn spec.rules.verifyImages.attestations.attestors.entries.keys.rekor.withUrl

withUrl(url)

"URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."

obj spec.rules.verifyImages.attestations.attestors.entries.keys.secret

"Reference to a Secret resource that contains a public key"

fn spec.rules.verifyImages.attestations.attestors.entries.keys.secret.withName

withName(name)

"Name of the secret. The provided secret must contain a key named cosign.pub."

fn spec.rules.verifyImages.attestations.attestors.entries.keys.secret.withNamespace

withNamespace(namespace)

"Namespace name where the Secret exists."

obj spec.rules.verifyImages.attestations.conditions

"Conditions are used to verify attributes within a Predicate. If no Conditions are specified the attestation check is satisfied as long there are predicates that match the predicate type."

fn spec.rules.verifyImages.attestations.conditions.withAll

withAll(all)

"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"

fn spec.rules.verifyImages.attestations.conditions.withAllMixin

withAllMixin(all)

"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"

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.attestations.conditions.withAny

withAny(any)

"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"

fn spec.rules.verifyImages.attestations.conditions.withAnyMixin

withAnyMixin(any)

"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"

Note: This function appends passed data to existing values

obj spec.rules.verifyImages.attestations.conditions.all

"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"

fn spec.rules.verifyImages.attestations.conditions.all.withKey

withKey(key)

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

fn spec.rules.verifyImages.attestations.conditions.all.withMessage

withMessage(message)

"Message is an optional display message"

fn spec.rules.verifyImages.attestations.conditions.all.withOperator

withOperator(operator)

"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"

fn spec.rules.verifyImages.attestations.conditions.all.withValue

withValue(value)

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

obj spec.rules.verifyImages.attestations.conditions.any

"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"

fn spec.rules.verifyImages.attestations.conditions.any.withKey

withKey(key)

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

fn spec.rules.verifyImages.attestations.conditions.any.withMessage

withMessage(message)

"Message is an optional display message"

fn spec.rules.verifyImages.attestations.conditions.any.withOperator

withOperator(operator)

"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"

fn spec.rules.verifyImages.attestations.conditions.any.withValue

withValue(value)

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

obj spec.rules.verifyImages.attestors

"Attestors specified the required attestors (i.e. authorities)"

fn spec.rules.verifyImages.attestors.withCount

withCount(count)

"Count specifies the required number of entries that must match. If the count is null, all entries must match (a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a value N, then N must be less than or equal to the size of entries, and at least N entries must match."

fn spec.rules.verifyImages.attestors.withEntries

withEntries(entries)

"Entries contains the available attestors. An attestor can be a static key, attributes for keyless verification, or a nested attestor declaration."

fn spec.rules.verifyImages.attestors.withEntriesMixin

withEntriesMixin(entries)

"Entries contains the available attestors. An attestor can be a static key, attributes for keyless verification, or a nested attestor declaration."

Note: This function appends passed data to existing values

obj spec.rules.verifyImages.attestors.entries

"Entries contains the available attestors. An attestor can be a static key, attributes for keyless verification, or a nested attestor declaration."

fn spec.rules.verifyImages.attestors.entries.withAnnotations

withAnnotations(annotations)

"Annotations are used for image verification. Every specified key-value pair must exist and match in the verified payload. The payload may contain other key-value pairs."

fn spec.rules.verifyImages.attestors.entries.withAnnotationsMixin

withAnnotationsMixin(annotations)

"Annotations are used for image verification. Every specified key-value pair must exist and match in the verified payload. The payload may contain other key-value pairs."

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.attestors.entries.withAttestor

withAttestor(attestor)

"Attestor is a nested set of Attestor used to specify a more complex set of match authorities."

fn spec.rules.verifyImages.attestors.entries.withRepository

withRepository(repository)

"Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule. If specified Repository will override other OCI image repository locations for this Attestor."

obj spec.rules.verifyImages.attestors.entries.certificates

"Certificates specifies one or more certificates."

fn spec.rules.verifyImages.attestors.entries.certificates.withCert

withCert(cert)

"Cert is an optional PEM-encoded public certificate."

fn spec.rules.verifyImages.attestors.entries.certificates.withCertChain

withCertChain(certChain)

"CertChain is an optional PEM encoded set of certificates used to verify."

obj spec.rules.verifyImages.attestors.entries.certificates.ctlog

"CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate Timestamps (SCTs). If the value is unset, the default behavior by Cosign is used."

fn spec.rules.verifyImages.attestors.entries.certificates.ctlog.withIgnoreSCT

withIgnoreSCT(ignoreSCT)

"IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate timestamp. Default is false. Set to true if this was opted out during signing."

fn spec.rules.verifyImages.attestors.entries.certificates.ctlog.withPubkey

withPubkey(pubkey)

"PubKey, if set, is used to validate SCTs against a custom source."

obj spec.rules.verifyImages.attestors.entries.certificates.rekor

"Rekor provides configuration for the Rekor transparency log service. If an empty object is provided the public instance of Rekor (https://rekor.sigstore.dev) is used."

fn spec.rules.verifyImages.attestors.entries.certificates.rekor.withIgnoreTlog

withIgnoreTlog(ignoreTlog)

"IgnoreTlog skips transparency log verification."

fn spec.rules.verifyImages.attestors.entries.certificates.rekor.withPubkey

withPubkey(pubkey)

"RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor. If set, this will be used to validate transparency log signatures from a custom Rekor."

fn spec.rules.verifyImages.attestors.entries.certificates.rekor.withUrl

withUrl(url)

"URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."

obj spec.rules.verifyImages.attestors.entries.keyless

"Keyless is a set of attribute used to verify a Sigstore keyless attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md."

fn spec.rules.verifyImages.attestors.entries.keyless.withAdditionalExtensions

withAdditionalExtensions(additionalExtensions)

"AdditionalExtensions are certificate-extensions used for keyless signing."

fn spec.rules.verifyImages.attestors.entries.keyless.withAdditionalExtensionsMixin

withAdditionalExtensionsMixin(additionalExtensions)

"AdditionalExtensions are certificate-extensions used for keyless signing."

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.attestors.entries.keyless.withIssuer

withIssuer(issuer)

"Issuer is the certificate issuer used for keyless signing."

fn spec.rules.verifyImages.attestors.entries.keyless.withRoots

withRoots(roots)

"Roots is an optional set of PEM encoded trusted root certificates. If not provided, the system roots are used."

fn spec.rules.verifyImages.attestors.entries.keyless.withSubject

withSubject(subject)

"Subject is the verified identity used for keyless signing, for example the email address."

obj spec.rules.verifyImages.attestors.entries.keyless.ctlog

"CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate Timestamps (SCTs). If the value is unset, the default behavior by Cosign is used."

fn spec.rules.verifyImages.attestors.entries.keyless.ctlog.withIgnoreSCT

withIgnoreSCT(ignoreSCT)

"IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate timestamp. Default is false. Set to true if this was opted out during signing."

fn spec.rules.verifyImages.attestors.entries.keyless.ctlog.withPubkey

withPubkey(pubkey)

"PubKey, if set, is used to validate SCTs against a custom source."

obj spec.rules.verifyImages.attestors.entries.keyless.rekor

"Rekor provides configuration for the Rekor transparency log service. If an empty object is provided the public instance of Rekor (https://rekor.sigstore.dev) is used."

fn spec.rules.verifyImages.attestors.entries.keyless.rekor.withIgnoreTlog

withIgnoreTlog(ignoreTlog)

"IgnoreTlog skips transparency log verification."

fn spec.rules.verifyImages.attestors.entries.keyless.rekor.withPubkey

withPubkey(pubkey)

"RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor. If set, this will be used to validate transparency log signatures from a custom Rekor."

fn spec.rules.verifyImages.attestors.entries.keyless.rekor.withUrl

withUrl(url)

"URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."

obj spec.rules.verifyImages.attestors.entries.keys

"Keys specifies one or more public keys."

fn spec.rules.verifyImages.attestors.entries.keys.withKms

withKms(kms)

"KMS provides the URI to the public key stored in a Key Management System. See: https://github.com/sigstore/cosign/blob/main/KMS.md"

fn spec.rules.verifyImages.attestors.entries.keys.withPublicKeys

withPublicKeys(publicKeys)

"Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly specified or can be a variable reference to a key specified in a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret elsewhere in the cluster by specifying it in the format \"k8s:///\". The named Secret must specify a key cosign.pub containing the public key used for verification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret). When multiple keys are specified each key is processed as a separate staticKey entry (.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."

fn spec.rules.verifyImages.attestors.entries.keys.withSignatureAlgorithm

withSignatureAlgorithm(signatureAlgorithm)

"Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."

obj spec.rules.verifyImages.attestors.entries.keys.ctlog

"CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate Timestamps (SCTs). If the value is unset, the default behavior by Cosign is used."

fn spec.rules.verifyImages.attestors.entries.keys.ctlog.withIgnoreSCT

withIgnoreSCT(ignoreSCT)

"IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate timestamp. Default is false. Set to true if this was opted out during signing."

fn spec.rules.verifyImages.attestors.entries.keys.ctlog.withPubkey

withPubkey(pubkey)

"PubKey, if set, is used to validate SCTs against a custom source."

obj spec.rules.verifyImages.attestors.entries.keys.rekor

"Rekor provides configuration for the Rekor transparency log service. If an empty object is provided the public instance of Rekor (https://rekor.sigstore.dev) is used."

fn spec.rules.verifyImages.attestors.entries.keys.rekor.withIgnoreTlog

withIgnoreTlog(ignoreTlog)

"IgnoreTlog skips transparency log verification."

fn spec.rules.verifyImages.attestors.entries.keys.rekor.withPubkey

withPubkey(pubkey)

"RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor. If set, this will be used to validate transparency log signatures from a custom Rekor."

fn spec.rules.verifyImages.attestors.entries.keys.rekor.withUrl

withUrl(url)

"URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."

obj spec.rules.verifyImages.attestors.entries.keys.secret

"Reference to a Secret resource that contains a public key"

fn spec.rules.verifyImages.attestors.entries.keys.secret.withName

withName(name)

"Name of the secret. The provided secret must contain a key named cosign.pub."

fn spec.rules.verifyImages.attestors.entries.keys.secret.withNamespace

withNamespace(namespace)

"Namespace name where the Secret exists."

obj spec.rules.verifyImages.imageRegistryCredentials

"ImageRegistryCredentials provides credentials that will be used for authentication with registry."

fn spec.rules.verifyImages.imageRegistryCredentials.withAllowInsecureRegistry

withAllowInsecureRegistry(allowInsecureRegistry)

"AllowInsecureRegistry allows insecure access to a registry."

fn spec.rules.verifyImages.imageRegistryCredentials.withProviders

withProviders(providers)

"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."

fn spec.rules.verifyImages.imageRegistryCredentials.withProvidersMixin

withProvidersMixin(providers)

"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."

Note: This function appends passed data to existing values

fn spec.rules.verifyImages.imageRegistryCredentials.withSecrets

withSecrets(secrets)

"Secrets specifies a list of secrets that are provided for credentials. Secrets must live in the Kyverno namespace."

fn spec.rules.verifyImages.imageRegistryCredentials.withSecretsMixin

withSecretsMixin(secrets)

"Secrets specifies a list of secrets that are provided for credentials. Secrets must live in the Kyverno namespace."

Note: This function appends passed data to existing values

obj spec.validationFailureActionOverrides

"ValidationFailureActionOverrides is a Cluster Policy attribute that specifies ValidationFailureAction namespace-wise. It overrides ValidationFailureAction for the specified namespaces."

fn spec.validationFailureActionOverrides.withAction

withAction(action)

"ValidationFailureAction defines the policy validation failure action"

fn spec.validationFailureActionOverrides.withNamespaces

withNamespaces(namespaces)

fn spec.validationFailureActionOverrides.withNamespacesMixin

withNamespacesMixin(namespaces)

Note: This function appends passed data to existing values

obj spec.validationFailureActionOverrides.namespaceSelector

"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects."

fn spec.validationFailureActionOverrides.namespaceSelector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.validationFailureActionOverrides.namespaceSelector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

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

Note: This function appends passed data to existing values

fn spec.validationFailureActionOverrides.namespaceSelector.withMatchLabels

withMatchLabels(matchLabels)

"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."

fn spec.validationFailureActionOverrides.namespaceSelector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"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."

Note: This function appends passed data to existing values

obj spec.validationFailureActionOverrides.namespaceSelector.matchExpressions

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

fn spec.validationFailureActionOverrides.namespaceSelector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.validationFailureActionOverrides.namespaceSelector.matchExpressions.withOperator

withOperator(operator)

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

fn spec.validationFailureActionOverrides.namespaceSelector.matchExpressions.withValues

withValues(values)

"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."

fn spec.validationFailureActionOverrides.namespaceSelector.matchExpressions.withValuesMixin

withValuesMixin(values)

"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."

Note: This function appends passed data to existing values

obj spec.webhookConfiguration

"WebhookConfiguration specifies the custom configuration for Kubernetes admission webhookconfiguration. Requires Kubernetes 1.27 or later."

fn spec.webhookConfiguration.withMatchConditions

withMatchConditions(matchConditions)

"MatchCondition configures admission webhook matchConditions."

fn spec.webhookConfiguration.withMatchConditionsMixin

withMatchConditionsMixin(matchConditions)

"MatchCondition configures admission webhook matchConditions."

Note: This function appends passed data to existing values

obj spec.webhookConfiguration.matchConditions

"MatchCondition configures admission webhook matchConditions."

fn spec.webhookConfiguration.matchConditions.withExpression

withExpression(expression)

"Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables: \n 'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/ \n Required."

fn spec.webhookConfiguration.matchConditions.withName

withName(name)

"Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') \n Required."