Skip to content

Commit e168005

Browse files
authored
Merge pull request #42270 from skrobul/validating-and-mutation-controllers
admission controllers: document types
2 parents 7e2c916 + f900deb commit e168005

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

content/en/docs/reference/access-authn-authz/admission-controllers.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,23 @@ the `admissionregistration.k8s.io/v1alpha1` API.
118118

119119
{{< feature-state for_k8s_version="v1.13" state="deprecated" >}}
120120

121+
**Type**: Validating.
122+
121123
This admission controller allows all pods into the cluster. It is **deprecated** because
122124
its behavior is the same as if there were no admission controller at all.
123125

124126
### AlwaysDeny {#alwaysdeny}
125127

126128
{{< feature-state for_k8s_version="v1.13" state="deprecated" >}}
127129

130+
**Type**: Validating.
131+
128132
Rejects all requests. AlwaysDeny is **deprecated** as it has no real meaning.
129133

130134
### AlwaysPullImages {#alwayspullimages}
131135

136+
**Type**: Mutating and Validating.
137+
132138
This admission controller modifies every new Pod to force the image pull policy to `Always`. This is useful in a
133139
multitenant cluster so that users can be assured that their private images can only be used by those
134140
who have the credentials to pull them. Without this admission controller, once an image has been pulled to a
@@ -139,6 +145,8 @@ required.
139145

140146
### CertificateApproval {#certificateapproval}
141147

148+
**Type**: Validating.
149+
142150
This admission controller observes requests to approve CertificateSigningRequest resources and performs additional
143151
authorization checks to ensure the approving user has permission to **approve** certificate requests with the
144152
`spec.signerName` requested on the CertificateSigningRequest resource.
@@ -148,6 +156,8 @@ information on the permissions required to perform different actions on Certific
148156

149157
### CertificateSigning {#certificatesigning}
150158

159+
**Type**: Validating.
160+
151161
This admission controller observes updates to the `status.certificate` field of CertificateSigningRequest resources
152162
and performs an additional authorization checks to ensure the signing user has permission to **sign** certificate
153163
requests with the `spec.signerName` requested on the CertificateSigningRequest resource.
@@ -157,12 +167,16 @@ information on the permissions required to perform different actions on Certific
157167

158168
### CertificateSubjectRestriction {#certificatesubjectrestriction}
159169

170+
**Type**: Validating.
171+
160172
This admission controller observes creation of CertificateSigningRequest resources that have a `spec.signerName`
161173
of `kubernetes.io/kube-apiserver-client`. It rejects any request that specifies a 'group' (or 'organization attribute')
162174
of `system:masters`.
163175

164176
### DefaultIngressClass {#defaultingressclass}
165177

178+
**Type**: Mutating.
179+
166180
This admission controller observes creation of `Ingress` objects that do not request any specific
167181
ingress class and automatically adds a default ingress class to them. This way, users that do not
168182
request any special ingress class do not need to care about them at all and they will get the
@@ -179,6 +193,8 @@ classes and how to mark one as default.
179193

180194
### DefaultStorageClass {#defaultstorageclass}
181195

196+
**Type**: Mutating.
197+
182198
This admission controller observes creation of `PersistentVolumeClaim` objects that do not request any specific storage class
183199
and automatically adds a default storage class to them.
184200
This way, users that do not request any special storage class do not need to care about them at all and they
@@ -194,6 +210,8 @@ storage classes and how to mark a storage class as default.
194210

195211
### DefaultTolerationSeconds {#defaulttolerationseconds}
196212

213+
**Type**: Mutating.
214+
197215
This admission controller sets the default forgiveness toleration for pods to tolerate
198216
the taints `notready:NoExecute` and `unreachable:NoExecute` based on the k8s-apiserver input parameters
199217
`default-not-ready-toleration-seconds` and `default-unreachable-toleration-seconds` if the pods don't already
@@ -203,6 +221,8 @@ The default value for `default-not-ready-toleration-seconds` and `default-unreac
203221

204222
### DenyServiceExternalIPs
205223

224+
**Type**: Validating.
225+
206226
This admission controller rejects all net-new usage of the `Service` field `externalIPs`. This
207227
feature is very powerful (allows network traffic interception) and not well
208228
controlled by policy. When enabled, users of the cluster may not create new
@@ -220,6 +240,8 @@ This admission controller is disabled by default.
220240

221241
{{< feature-state for_k8s_version="v1.13" state="alpha" >}}
222242

243+
**Type**: Validating.
244+
223245
This admission controller mitigates the problem where the API server gets flooded by
224246
requests to store new Events. The cluster admin can specify event rate limits by:
225247

@@ -266,6 +288,8 @@ This admission controller is disabled by default.
266288
267289
### ExtendedResourceToleration {#extendedresourcetoleration}
268290
291+
**Type**: Mutating.
292+
269293
This plug-in facilitates creation of dedicated nodes with extended resources.
270294
If operators want to create dedicated nodes with extended resources (like GPUs, FPGAs etc.), they are expected to
271295
[taint the node](/docs/concepts/scheduling-eviction/taint-and-toleration/#example-use-cases) with the extended resource
@@ -277,6 +301,8 @@ This admission controller is disabled by default.
277301
278302
### ImagePolicyWebhook {#imagepolicywebhook}
279303
304+
**Type**: Validating.
305+
280306
The ImagePolicyWebhook admission controller allows a backend webhook to make admission decisions.
281307
282308
This admission controller is disabled by default.
@@ -439,13 +465,17 @@ In any case, the annotations are provided by the user and are not validated by K
439465

440466
### LimitPodHardAntiAffinityTopology {#limitpodhardantiaffinitytopology}
441467

468+
**Type**: Validating.
469+
442470
This admission controller denies any pod that defines `AntiAffinity` topology key other than
443471
`kubernetes.io/hostname` in `requiredDuringSchedulingRequiredDuringExecution`.
444472

445473
This admission controller is disabled by default.
446474

447475
### LimitRanger {#limitranger}
448476

477+
**Type**: Mutating and Validating.
478+
449479
This admission controller will observe the incoming request and ensure that it does not violate
450480
any of the constraints enumerated in the `LimitRange` object in a `Namespace`. If you are using
451481
`LimitRange` objects in your Kubernetes deployment, you MUST use this admission controller to
@@ -459,6 +489,8 @@ for more details.
459489

460490
### MutatingAdmissionWebhook {#mutatingadmissionwebhook}
461491

492+
**Type**: Mutating.
493+
462494
This admission controller calls any mutating webhooks which match the request. Matching
463495
webhooks are called in serial; each one may modify the object if it desires.
464496

@@ -487,6 +519,8 @@ group/version via the `--runtime-config` flag, both are on by default.
487519

488520
### NamespaceAutoProvision {#namespaceautoprovision}
489521

522+
**Type**: Mutating.
523+
490524
This admission controller examines all incoming requests on namespaced resources and checks
491525
if the referenced namespace does exist.
492526
It creates a namespace if it cannot be found.
@@ -495,11 +529,15 @@ a namespace prior to its usage.
495529

496530
### NamespaceExists {#namespaceexists}
497531

532+
**Type**: Validating.
533+
498534
This admission controller checks all requests on namespaced resources other than `Namespace` itself.
499535
If the namespace referenced from a request doesn't exist, the request is rejected.
500536

501537
### NamespaceLifecycle {#namespacelifecycle}
502538

539+
**Type**: Validating.
540+
503541
This admission controller enforces that a `Namespace` that is undergoing termination cannot have
504542
new objects created in it, and ensures that requests in a non-existent `Namespace` are rejected.
505543
This admission controller also prevents deletion of three system reserved namespaces `default`,
@@ -511,6 +549,8 @@ running this admission controller.
511549

512550
### NodeRestriction {#noderestriction}
513551

552+
**Type**: Validating.
553+
514554
This admission controller limits the `Node` and `Pod` objects a kubelet can modify. In order to be limited by this admission controller,
515555
kubelets must use credentials in the `system:nodes` group, with a username in the form `system:node:<nodeName>`.
516556
Such kubelets will only be allowed to modify their own `Node` API object, and only modify `Pod` API objects that are bound to their node.
@@ -543,6 +583,8 @@ permissions required to operate correctly.
543583

544584
### OwnerReferencesPermissionEnforcement {#ownerreferencespermissionenforcement}
545585

586+
**Type**: Validating.
587+
546588
This admission controller protects the access to the `metadata.ownerReferences` of an object
547589
so that only users with **delete** permission to the object can change it.
548590
This admission controller also protects the access to `metadata.ownerReferences[x].blockOwnerDeletion`
@@ -553,6 +595,8 @@ subresource of the referenced *owner* can change it.
553595

554596
{{< feature-state for_k8s_version="v1.24" state="stable" >}}
555597

598+
**Type**: Validating.
599+
556600
This admission controller implements additional validations for checking incoming
557601
`PersistentVolumeClaim` resize requests.
558602

@@ -582,6 +626,8 @@ For more information about persistent volume claims, see [PersistentVolumeClaims
582626

583627
{{< feature-state for_k8s_version="v1.13" state="deprecated" >}}
584628

629+
**Type**: Mutating.
630+
585631
This admission controller automatically attaches region or zone labels to PersistentVolumes
586632
as defined by the cloud provider (for example, Azure or GCP).
587633
It helps ensure the Pods and the PersistentVolumes mounted are in the same
@@ -597,6 +643,8 @@ This admission controller is disabled by default.
597643

598644
{{< feature-state for_k8s_version="v1.5" state="alpha" >}}
599645

646+
**Type**: Validating.
647+
600648
This admission controller defaults and limits what node selectors may be used within a namespace
601649
by reading a namespace annotation and a global configuration.
602650

@@ -663,6 +711,8 @@ admission plugin, which allows preventing pods from running on specifically tain
663711

664712
{{< feature-state for_k8s_version="v1.25" state="stable" >}}
665713

714+
**Type**: Validating.
715+
666716
The PodSecurity admission controller checks new Pods before they are
667717
admitted, determines if it should be admitted based on the requested security context and the restrictions on permitted
668718
[Pod Security Standards](/docs/concepts/security/pod-security-standards/)
@@ -677,6 +727,8 @@ PodSecurity replaced an older admission controller named PodSecurityPolicy.
677727

678728
{{< feature-state for_k8s_version="v1.7" state="alpha" >}}
679729

730+
**Type**: Mutating and Validating.
731+
680732
The PodTolerationRestriction admission controller verifies any conflict between tolerations of a
681733
pod and the tolerations of its namespace.
682734
It rejects the pod request if there is a conflict.
@@ -707,12 +759,16 @@ This admission controller is disabled by default.
707759

708760
### Priority {#priority}
709761

762+
**Type**: Mutating and Validating.
763+
710764
The priority admission controller uses the `priorityClassName` field and populates the integer
711765
value of the priority.
712766
If the priority class is not found, the Pod is rejected.
713767

714768
### ResourceQuota {#resourcequota}
715769

770+
**Type**: Validating.
771+
716772
This admission controller will observe the incoming request and ensure that it does not violate
717773
any of the constraints enumerated in the `ResourceQuota` object in a `Namespace`. If you are
718774
using `ResourceQuota` objects in your Kubernetes deployment, you MUST use this admission
@@ -723,6 +779,8 @@ and the [example of Resource Quota](/docs/concepts/policy/resource-quotas/) for
723779

724780
### RuntimeClass {#runtimeclass}
725781

782+
**Type**: Mutating and Validating.
783+
726784
If you define a RuntimeClass with [Pod overhead](/docs/concepts/scheduling-eviction/pod-overhead/)
727785
configured, this admission controller checks incoming Pods.
728786
When enabled, this admission controller rejects any Pod create requests
@@ -736,6 +794,8 @@ for more information.
736794

737795
### SecurityContextDeny {#securitycontextdeny}
738796

797+
**Type**: Validating.
798+
739799
{{< feature-state for_k8s_version="v1.27" state="deprecated" >}}
740800

741801
{{< caution >}}
@@ -777,6 +837,8 @@ article details the PodSecurityPolicy historical context and the birth of the
777837

778838
### ServiceAccount {#serviceaccount}
779839

840+
**Type**: Mutating and Validating.
841+
780842
This admission controller implements automation for
781843
[serviceAccounts](/docs/tasks/configure-pod-container/configure-service-account/).
782844
The Kubernetes project strongly recommends enabling this admission controller.
@@ -785,6 +847,8 @@ You should enable this admission controller if you intend to make any use of Kub
785847

786848
### StorageObjectInUseProtection
787849

850+
**Type**: Mutating.
851+
788852
The `StorageObjectInUseProtection` plugin adds the `kubernetes.io/pvc-protection` or `kubernetes.io/pv-protection`
789853
finalizers to newly created Persistent Volume Claims (PVCs) or Persistent Volumes (PV).
790854
In case a user deletes a PVC or PV the PVC or PV is not removed until the finalizer is removed
@@ -795,19 +859,25 @@ for more detailed information.
795859

796860
### TaintNodesByCondition {#taintnodesbycondition}
797861

862+
**Type**: Mutating.
863+
798864
This admission controller {{< glossary_tooltip text="taints" term_id="taint" >}} newly created
799865
Nodes as `NotReady` and `NoSchedule`. That tainting avoids a race condition that could cause Pods
800866
to be scheduled on new Nodes before their taints were updated to accurately reflect their reported
801867
conditions.
802868

803869
### ValidatingAdmissionPolicy {#validatingadmissionpolicy}
804870

871+
**Type**: Validating.
872+
805873
[This admission controller](/docs/reference/access-authn-authz/validating-admission-policy/) implements the CEL validation for incoming matched requests.
806874
It is enabled when both feature gate `validatingadmissionpolicy` and `admissionregistration.k8s.io/v1alpha1` group/version are enabled.
807875
If any of the ValidatingAdmissionPolicy fails, the request fails.
808876

809877
### ValidatingAdmissionWebhook {#validatingadmissionwebhook}
810878

879+
**Type**: Validating.
880+
811881
This admission controller calls any validating webhooks which match the request. Matching
812882
webhooks are called in parallel; if any of them rejects the request, the request
813883
fails. This admission controller only runs in the validation phase; the webhooks it calls may not

0 commit comments

Comments
 (0)