kyverno.v1.clusterPolicy
"ClusterPolicy declares validation, mutation, and generation behaviors for matching resources."
Index
fn new(name)
obj metadata
fn withAnnotations(annotations)
fn withAnnotationsMixin(annotations)
fn withClusterName(clusterName)
fn withCreationTimestamp(creationTimestamp)
fn withDeletionGracePeriodSeconds(deletionGracePeriodSeconds)
fn withDeletionTimestamp(deletionTimestamp)
fn withFinalizers(finalizers)
fn withFinalizersMixin(finalizers)
fn withGenerateName(generateName)
fn withGeneration(generation)
fn withLabels(labels)
fn withLabelsMixin(labels)
fn withName(name)
fn withNamespace(namespace)
fn withOwnerReferences(ownerReferences)
fn withOwnerReferencesMixin(ownerReferences)
fn withResourceVersion(resourceVersion)
fn withSelfLink(selfLink)
fn withUid(uid)
obj spec
fn withApplyRules(applyRules)
fn withBackground(background)
fn withFailurePolicy(failurePolicy)
fn withGenerateExistingOnPolicyUpdate(generateExistingOnPolicyUpdate)
fn withMutateExistingOnPolicyUpdate(mutateExistingOnPolicyUpdate)
fn withRules(rules)
fn withRulesMixin(rules)
fn withSchemaValidation(schemaValidation)
fn withValidationFailureAction(validationFailureAction)
fn withValidationFailureActionOverrides(validationFailureActionOverrides)
fn withValidationFailureActionOverridesMixin(validationFailureActionOverrides)
fn withWebhookTimeoutSeconds(webhookTimeoutSeconds)
obj spec.rules
fn withContext(context)
fn withContextMixin(context)
fn withImageExtractors(imageExtractors)
fn withImageExtractorsMixin(imageExtractors)
fn withName(name)
fn withPreconditions(preconditions)
fn withVerifyImages(verifyImages)
fn withVerifyImagesMixin(verifyImages)
obj spec.rules.context
obj spec.rules.exclude
fn withAll(all)
fn withAllMixin(all)
fn withAny(any)
fn withAnyMixin(any)
fn withClusterRoles(clusterRoles)
fn withClusterRolesMixin(clusterRoles)
fn withRoles(roles)
fn withRolesMixin(roles)
fn withSubjects(subjects)
fn withSubjectsMixin(subjects)
obj spec.rules.exclude.all
fn withClusterRoles(clusterRoles)
fn withClusterRolesMixin(clusterRoles)
fn withRoles(roles)
fn withRolesMixin(roles)
fn withSubjects(subjects)
fn withSubjectsMixin(subjects)
obj spec.rules.exclude.all.resources
fn withAnnotations(annotations)
fn withAnnotationsMixin(annotations)
fn withKinds(kinds)
fn withKindsMixin(kinds)
fn withName(name)
fn withNames(names)
fn withNamesMixin(names)
fn withNamespaces(namespaces)
fn withNamespacesMixin(namespaces)
obj spec.rules.exclude.all.resources.namespaceSelector
obj spec.rules.exclude.all.resources.selector
obj spec.rules.exclude.all.subjects
obj spec.rules.exclude.any
fn withClusterRoles(clusterRoles)
fn withClusterRolesMixin(clusterRoles)
fn withRoles(roles)
fn withRolesMixin(roles)
fn withSubjects(subjects)
fn withSubjectsMixin(subjects)
obj spec.rules.exclude.any.resources
fn withAnnotations(annotations)
fn withAnnotationsMixin(annotations)
fn withKinds(kinds)
fn withKindsMixin(kinds)
fn withName(name)
fn withNames(names)
fn withNamesMixin(names)
fn withNamespaces(namespaces)
fn withNamespacesMixin(namespaces)
obj spec.rules.exclude.any.resources.namespaceSelector
obj spec.rules.exclude.any.resources.selector
obj spec.rules.exclude.any.subjects
obj spec.rules.exclude.resources
fn withAnnotations(annotations)
fn withAnnotationsMixin(annotations)
fn withKinds(kinds)
fn withKindsMixin(kinds)
fn withName(name)
fn withNames(names)
fn withNamesMixin(names)
fn withNamespaces(namespaces)
fn withNamespacesMixin(namespaces)
obj spec.rules.exclude.resources.namespaceSelector
obj spec.rules.exclude.resources.selector
obj spec.rules.exclude.subjects
obj spec.rules.generate
fn withApiVersion(apiVersion)
fn withData(data)
fn withKind(kind)
fn withName(name)
fn withNamespace(namespace)
fn withSynchronize(synchronize)
obj spec.rules.generate.clone
obj spec.rules.generate.cloneList
fn withKinds(kinds)
fn withKindsMixin(kinds)
fn withNamespace(namespace)
obj spec.rules.generate.cloneList.selector
obj spec.rules.match
fn withAll(all)
fn withAllMixin(all)
fn withAny(any)
fn withAnyMixin(any)
fn withClusterRoles(clusterRoles)
fn withClusterRolesMixin(clusterRoles)
fn withRoles(roles)
fn withRolesMixin(roles)
fn withSubjects(subjects)
fn withSubjectsMixin(subjects)
obj spec.rules.match.all
fn withClusterRoles(clusterRoles)
fn withClusterRolesMixin(clusterRoles)
fn withRoles(roles)
fn withRolesMixin(roles)
fn withSubjects(subjects)
fn withSubjectsMixin(subjects)
obj spec.rules.match.all.resources
fn withAnnotations(annotations)
fn withAnnotationsMixin(annotations)
fn withKinds(kinds)
fn withKindsMixin(kinds)
fn withName(name)
fn withNames(names)
fn withNamesMixin(names)
fn withNamespaces(namespaces)
fn withNamespacesMixin(namespaces)
obj spec.rules.match.all.resources.namespaceSelector
obj spec.rules.match.all.resources.selector
obj spec.rules.match.all.subjects
obj spec.rules.match.any
fn withClusterRoles(clusterRoles)
fn withClusterRolesMixin(clusterRoles)
fn withRoles(roles)
fn withRolesMixin(roles)
fn withSubjects(subjects)
fn withSubjectsMixin(subjects)
obj spec.rules.match.any.resources
fn withAnnotations(annotations)
fn withAnnotationsMixin(annotations)
fn withKinds(kinds)
fn withKindsMixin(kinds)
fn withName(name)
fn withNames(names)
fn withNamesMixin(names)
fn withNamespaces(namespaces)
fn withNamespacesMixin(namespaces)
obj spec.rules.match.any.resources.namespaceSelector
obj spec.rules.match.any.resources.selector
obj spec.rules.match.any.subjects
obj spec.rules.match.resources
fn withAnnotations(annotations)
fn withAnnotationsMixin(annotations)
fn withKinds(kinds)
fn withKindsMixin(kinds)
fn withName(name)
fn withNames(names)
fn withNamesMixin(names)
fn withNamespaces(namespaces)
fn withNamespacesMixin(namespaces)
obj spec.rules.match.resources.namespaceSelector
obj spec.rules.match.resources.selector
obj spec.rules.match.subjects
obj spec.rules.mutate
fn withForeach(foreach)
fn withForeachMixin(foreach)
fn withPatchStrategicMerge(patchStrategicMerge)
fn withPatchesJson6902(patchesJson6902)
fn withTargets(targets)
fn withTargetsMixin(targets)
obj spec.rules.mutate.foreach
fn withContext(context)
fn withContextMixin(context)
fn withForeach(foreach)
fn withList(list)
fn withPatchStrategicMerge(patchStrategicMerge)
fn withPatchesJson6902(patchesJson6902)
obj spec.rules.mutate.foreach.context
obj spec.rules.mutate.foreach.preconditions
obj spec.rules.mutate.targets
obj spec.rules.validate
fn withAnyPattern(anyPattern)
fn withForeach(foreach)
fn withForeachMixin(foreach)
fn withMessage(message)
fn withPattern(pattern)
obj spec.rules.validate.deny
obj spec.rules.validate.foreach
fn withAnyPattern(anyPattern)
fn withContext(context)
fn withContextMixin(context)
fn withElementScope(elementScope)
fn withForeach(foreach)
fn withList(list)
fn withPattern(pattern)
obj spec.rules.validate.foreach.context
obj spec.rules.validate.foreach.deny
obj spec.rules.validate.foreach.preconditions
obj spec.rules.validate.manifests
fn withAnnotationDomain(annotationDomain)
fn withAttestors(attestors)
fn withAttestorsMixin(attestors)
fn withIgnoreFields(ignoreFields)
fn withIgnoreFieldsMixin(ignoreFields)
fn withRepository(repository)
obj spec.rules.validate.manifests.attestors
fn withCount(count)
fn withEntries(entries)
fn withEntriesMixin(entries)
obj spec.rules.validate.manifests.attestors.entries
fn withAnnotations(annotations)
fn withAnnotationsMixin(annotations)
fn withAttestor(attestor)
fn withRepository(repository)
obj spec.rules.validate.manifests.attestors.entries.certificates
obj spec.rules.validate.manifests.attestors.entries.keyless
obj spec.rules.validate.manifests.attestors.entries.keys
obj spec.rules.validate.manifests.dryRun
obj spec.rules.validate.manifests.ignoreFields
obj spec.rules.validate.podSecurity
obj spec.rules.verifyImages
fn withAdditionalExtensions(additionalExtensions)
fn withAdditionalExtensionsMixin(additionalExtensions)
fn withAnnotations(annotations)
fn withAnnotationsMixin(annotations)
fn withAttestations(attestations)
fn withAttestationsMixin(attestations)
fn withAttestors(attestors)
fn withAttestorsMixin(attestors)
fn withImage(image)
fn withImageReferences(imageReferences)
fn withImageReferencesMixin(imageReferences)
fn withIssuer(issuer)
fn withKey(key)
fn withMutateDigest(mutateDigest)
fn withRepository(repository)
fn withRequired(required)
fn withRoots(roots)
fn withSubject(subject)
fn withVerifyDigest(verifyDigest)
obj spec.rules.verifyImages.attestations
fn withAttestors(attestors)
fn withAttestorsMixin(attestors)
fn withConditions(conditions)
fn withConditionsMixin(conditions)
fn withPredicateType(predicateType)
obj spec.rules.verifyImages.attestations.attestors
fn withCount(count)
fn withEntries(entries)
fn withEntriesMixin(entries)
obj spec.rules.verifyImages.attestations.attestors.entries
fn withAnnotations(annotations)
fn withAnnotationsMixin(annotations)
fn withAttestor(attestor)
fn withRepository(repository)
obj spec.rules.verifyImages.attestations.attestors.entries.certificates
obj spec.rules.verifyImages.attestations.attestors.entries.keyless
obj spec.rules.verifyImages.attestations.attestors.entries.keys
obj spec.rules.verifyImages.attestations.conditions
obj spec.rules.verifyImages.attestors
fn withCount(count)
fn withEntries(entries)
fn withEntriesMixin(entries)
obj spec.rules.verifyImages.attestors.entries
obj spec.validationFailureActionOverrides
Fields
fn new
new(name)
new returns an instance of ClusterPolicy
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"
fn metadata.withSelfLink
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 declares policy behaviors."
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.withGenerateExistingOnPolicyUpdate
withGenerateExistingOnPolicyUpdate(generateExistingOnPolicyUpdate)
"GenerateExistingOnPolicyUpdate 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.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)
"SchemaValidation skips validation checks for policies as well as patched resources. Optional. The default value is set to \"true\", it must be set to \"false\" to disable the validation checks."
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.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.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.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 defines an HTTP request to the Kubernetes API server. The JSON data retrieved is stored in the context."
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 API server. For example a JMESPath of \"items | length(@)\" applied to the API server response to the URLPath \"/apis/apps/v1/deployments\" will return the total count of deployments across all namespaces."
fn spec.rules.context.apiCall.withUrlPath
withUrlPath(urlPath)
"URLPath is the URL path to be used in the HTTP GET 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."
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.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.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
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
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
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.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."
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
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
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
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.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 defines an HTTP request to the Kubernetes API server. The JSON data retrieved is stored in the context."
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 API server. For example a JMESPath of \"items | length(@)\" applied to the API server response to the URLPath \"/apis/apps/v1/deployments\" will return the total count of deployments across all namespaces."
fn spec.rules.mutate.foreach.context.apiCall.withUrlPath
withUrlPath(urlPath)
"URLPath is the URL path to be used in the HTTP GET 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."
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.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.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.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.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.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."
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.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 defines an HTTP request to the Kubernetes API server. The JSON data retrieved is stored in the context."
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 API server. For example a JMESPath of \"items | length(@)\" applied to the API server response to the URLPath \"/apis/apps/v1/deployments\" will return the total count of deployments across all namespaces."
fn spec.rules.validate.foreach.context.apiCall.withUrlPath
withUrlPath(urlPath)
"URLPath is the URL path to be used in the HTTP GET 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."
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.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.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.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.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 AttestorSet 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)
"Certificate is an optional PEM encoded public certificate."
fn spec.rules.validate.manifests.attestors.entries.certificates.withCertChain
withCertChain(certChain)
"CertificateChain is an optional PEM encoded set of certificates used to verify"
obj spec.rules.validate.manifests.attestors.entries.certificates.rekor
"Rekor provides configuration for the Rekor transparency log service. If the value is nil, Rekor is not checked. 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.withUrl
withUrl(url)
"URL is the address of the transparency log. Defaults to the public log 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.rekor
"Rekor provides configuration for the Rekor transparency log service. If the value is nil, Rekor is not checked and a root certificate chain is expected instead. 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.withUrl
withUrl(url)
"URL is the address of the transparency log. Defaults to the public log 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://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 sha256 and sha512"
obj spec.rules.validate.manifests.attestors.entries.keys.rekor
"Rekor provides configuration for the Rekor transparency log service. If the value is nil, Rekor is not checked. 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.withUrl
withUrl(url)
"URL is the address of the transparency log. Defaults to the public log 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, 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
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)
"AdditionalExtensions are certificate-extensions used for keyless signing. Deprecated."
fn spec.rules.verifyImages.withAdditionalExtensionsMixin
withAdditionalExtensionsMixin(additionalExtensions)
"AdditionalExtensions are certificate-extensions used for keyless signing. Deprecated."
Note: This function appends passed data to existing values
fn spec.rules.verifyImages.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. Deprecated. Use annotations per Attestor instead."
fn spec.rules.verifyImages.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. 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)
"Image is the image name consisting of the registry address, repository, image, and tag. Wildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images. 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)
"Issuer is the certificate issuer used for keyless signing. Deprecated. Use KeylessAttestor instead."
fn spec.rules.verifyImages.withKey
withKey(key)
"Key is the PEM encoded public key that the image or attestation is signed with. 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)
"Roots is the PEM encoded Root certificate chain used for keyless signing Deprecated. Use KeylessAttestor instead."
fn spec.rules.verifyImages.withSubject
withSubject(subject)
"Subject is the identity used for keyless signing, for example an email address Deprecated. Use KeylessAttestor instead."
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)
"PredicateType defines the type of Predicate 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 AttestorSet 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)
"Certificate is an optional PEM encoded public certificate."
fn spec.rules.verifyImages.attestations.attestors.entries.certificates.withCertChain
withCertChain(certChain)
"CertificateChain is an optional PEM encoded set of certificates used to verify"
obj spec.rules.verifyImages.attestations.attestors.entries.certificates.rekor
"Rekor provides configuration for the Rekor transparency log service. If the value is nil, Rekor is not checked. 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.withUrl
withUrl(url)
"URL is the address of the transparency log. Defaults to the public log 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.rekor
"Rekor provides configuration for the Rekor transparency log service. If the value is nil, Rekor is not checked and a root certificate chain is expected instead. 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.withUrl
withUrl(url)
"URL is the address of the transparency log. Defaults to the public log 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://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 sha256 and sha512"
obj spec.rules.verifyImages.attestations.attestors.entries.keys.rekor
"Rekor provides configuration for the Rekor transparency log service. If the value is nil, Rekor is not checked. 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.withUrl
withUrl(url)
"URL is the address of the transparency log. Defaults to the public log 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.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.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 AttestorSet 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)
"Certificate is an optional PEM encoded public certificate."
fn spec.rules.verifyImages.attestors.entries.certificates.withCertChain
withCertChain(certChain)
"CertificateChain is an optional PEM encoded set of certificates used to verify"
obj spec.rules.verifyImages.attestors.entries.certificates.rekor
"Rekor provides configuration for the Rekor transparency log service. If the value is nil, Rekor is not checked. 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.withUrl
withUrl(url)
"URL is the address of the transparency log. Defaults to the public log 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.rekor
"Rekor provides configuration for the Rekor transparency log service. If the value is nil, Rekor is not checked and a root certificate chain is expected instead. 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.withUrl
withUrl(url)
"URL is the address of the transparency log. Defaults to the public log 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://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 sha256 and sha512"
obj spec.rules.verifyImages.attestors.entries.keys.rekor
"Rekor provides configuration for the Rekor transparency log service. If the value is nil, Rekor is not checked. 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.withUrl
withUrl(url)
"URL is the address of the transparency log. Defaults to the public log 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.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