⎈ k8s knowledge compiler

MutatingAdmissionPolicy [page]deterministic

MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.

referencesecurity

`apiVersion: admissionregistration.k8s.io/v1`

`import "k8s.io/api/admissionregistration/v1"`

## MutatingAdmissionPolicy {#MutatingAdmissionPolicy}

MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.

<hr>

<table> <thead><tr><th>Field</th><th>Description</th></tr></thead> <tbody> <tr> <td><code>apiVersion</code><br/><em>string</em></td> <td>APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources</td> </tr> <tr> <td><code>kind</code><br/><em>string</em></td> <td>Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds</td> </tr> <tr> <td><code>metadata</code><br/><em><a href="">ObjectMeta</a></em></td> <td>metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.</td> </tr> <tr> <td><code>spec</code><br/><em><a href="">MutatingAdmissionPolicySpec</a></em></td> <td>spec defines the desired behavior of the MutatingAdmissionPolicy.</td> </tr> </tbody> </table>

## MutatingAdmissionPolicySpec {#MutatingAdmissionPolicySpec}

MutatingAdmissionPolicySpec defines the desired behavior of the admission policy.

<hr>

<table> <thead><tr><th>Field</th><th>Description</th></tr></thead> <tbody> <tr> <td><code>failurePolicy</code><br/><em>string</em></td> <td>failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings. A policy is invalid if paramKind refers to a non-existent Kind. A binding is invalid if paramRef.name refers to a non-existent resource. failurePolicy does not define how validations that evaluate to false are handled. Allowed values are Ignore or Fail. Defaults to Fail.<br/><br/>Possible enum values:<br/> - `"Fail"` means that an error calling the webhook causes the admission to fail.<br/> - `"Ignore"` means that an error calling the webhook is ignored.</td> </tr> <tr> <td><code>matchConditions</code><br/><em><a href="">MatchCondition array</a></em><br/><em>patch strategy: merge on key <code>name</code></em></td> <td>matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the policy is skipped</td> </tr> <tr> <td><code>matchConstraints</code><br/><em><a href="">MatchResources</a></em></td> <td>matchConstraints specifies what resources this policy is designed to validate. The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API MutatingAdmissionPolicy cannot match MutatingAdmis …(trimmed)

Sources

reference/kubernetes-api/admissionregistration/mutating-admission-policy-v1.md · docMutatingAdmissionPolicy

Related (17)

part_of ApplyConfiguration {#ApplyConfiguration}describes conf=1
part_of JSONPatch {#JSONPatch}describes conf=1
part_of Mutation {#Mutation}describes conf=1
part_of Operations {#Operations}describes conf=1
part_of `post` Createdescribes conf=1
part_of `patch` Patchdescribes conf=1
part_of `put` Replacedescribes conf=1
part_of `delete` Deletedescribes conf=1
part_of `delete` Delete Collectiondescribes conf=1
part_of `get` Readdescribes conf=1
part_of `get` Listdescribes conf=1
part_of `get` Watchdescribes conf=1
part_of `get` Watch Listdescribes conf=1
api_for MutatingAdmissionPolicydocuments API object conf=1

← all Docs