@@ -282,98 +282,109 @@ This example shows the data contained in an `AdmissionReview` object
282
282
for a request to update the `scale` subresource of an `apps/v1` `Deployment` :
283
283
284
284
` ` ` yaml
285
- apiVersion: admission.k8s.io/v1
286
- kind: AdmissionReview
287
- request:
288
- # Random uid uniquely identifying this admission call
289
- uid: 705ab4f5-6393-11e8-b7cc-42010a800002
290
-
291
- # Fully-qualified group/version/kind of the incoming object
292
- kind:
293
- group: autoscaling
294
- version: v1
295
- kind: Scale
296
-
297
- # Fully-qualified group/version/kind of the resource being modified
298
- resource:
299
- group: apps
300
- version: v1
301
- resource: deployments
302
-
303
- # subresource, if the request is to a subresource
304
- subResource: scale
305
-
306
- # Fully-qualified group/version/kind of the incoming object in the original request to the API server.
307
- # This only differs from ` kind` if the webhook specified `matchPolicy: Equivalent` and the
308
- # original request to the API server was converted to a version the webhook registered for.
309
- requestKind :
310
- group : autoscaling
311
- version : v1
312
- kind : Scale
313
-
314
- # Fully-qualified group/version/kind of the resource being modified in the original request to the API server.
315
- # This only differs from `resource` if the webhook specified `matchPolicy: Equivalent` and the
316
- # original request to the API server was converted to a version the webhook registered for.
317
- requestResource :
318
- group : apps
319
- version : v1
320
- resource : deployments
321
-
322
- # subresource, if the request is to a subresource
323
- # This only differs from `subResource` if the webhook specified `matchPolicy: Equivalent` and the
324
- # original request to the API server was converted to a version the webhook registered for.
325
- requestSubResource : scale
326
-
327
- # Name of the resource being modified
328
- name : my-deployment
329
-
330
- # Namespace of the resource being modified, if the resource is namespaced (or is a Namespace object)
331
- namespace : my-namespace
332
-
333
- # operation can be CREATE, UPDATE, DELETE, or CONNECT
334
- operation : UPDATE
335
-
336
- userInfo :
337
- # Username of the authenticated user making the request to the API server
338
- username : admin
339
-
340
- # UID of the authenticated user making the request to the API server
341
- uid : 014fbff9a07c
342
-
343
- # Group memberships of the authenticated user making the request to the API server
344
- groups :
345
- - system:authenticated
346
- - my-admin-group
347
- # Arbitrary extra info associated with the user making the request to the API server.
348
- # This is populated by the API server authentication layer and should be included
349
- # if any SubjectAccessReview checks are performed by the webhook.
350
- extra :
351
- some-key :
352
- - some-value1
353
- - some-value2
354
-
355
- # object is the new object being admitted.
356
- # It is null for DELETE operations.
357
- object :
358
- apiVersion : autoscaling/v1
359
- kind : Scale
360
-
361
- # oldObject is the existing object.
362
- # It is null for CREATE and CONNECT operations.
363
- oldObject :
364
- apiVersion : autoscaling/v1
365
- kind : Scale
366
-
367
- # options contains the options for the operation being admitted, like meta.k8s.io/v1 CreateOptions, UpdateOptions, or DeleteOptions.
368
- # It is null for CONNECT operations.
369
- options :
370
- apiVersion : meta.k8s.io/v1
371
- kind : UpdateOptions
372
-
373
- # dryRun indicates the API request is running in dry run mode and will not be persisted.
374
- # Webhooks with side effects should avoid actuating those side effects when dryRun is true.
375
- # See http://k8s.io/docs/reference/using-api/api-concepts/#make-a-dry-run-request for more details.
376
- dryRun : False
285
+ {
286
+ "apiVersion": "admission.k8s.io/v1",
287
+ "kind": "AdmissionReview",
288
+ "request": {
289
+ # Random uid uniquely identifying this admission call
290
+ "uid": "705ab4f5-6393-11e8-b7cc-42010a800002",
291
+
292
+ # Fully-qualified group/version/kind of the incoming object
293
+ "kind": {
294
+ "group": "autoscaling",
295
+ "version": "v1",
296
+ "kind": "Scale"
297
+ },
298
+
299
+ # Fully-qualified group/version/kind of the resource being modified
300
+ "resource": {
301
+ "group": "apps",
302
+ "version": "v1",
303
+ "resource": "deployments"
304
+ },
305
+
306
+ # Subresource, if the request is to a subresource
307
+ "subResource": "scale",
308
+
309
+ # Fully-qualified group/version/kind of the incoming object in the original request to the API server
310
+ # This only differs from ` kind` if the webhook specified `matchPolicy: Equivalent` and the original
311
+ # request to the API server was converted to a version the webhook registered for
312
+ " requestKind " : {
313
+ " group " : " autoscaling" ,
314
+ " version " : " v1" ,
315
+ " kind " : " Scale"
316
+ },
317
+
318
+ # Fully-qualified group/version/kind of the resource being modified in the original request to the API server
319
+ # This only differs from `resource` if the webhook specified `matchPolicy: Equivalent` and the original
320
+ # request to the API server was converted to a version the webhook registered for
321
+ " requestResource " : {
322
+ " group " : " apps" ,
323
+ " version " : " v1" ,
324
+ " resource " : " deployments"
325
+ },
326
+
327
+ # Subresource, if the request is to a subresource
328
+ # This only differs from `subResource` if the webhook specified `matchPolicy: Equivalent` and the original
329
+ # request to the API server was converted to a version the webhook registered for
330
+ " requestSubResource " : " scale" ,
331
+
332
+ # Name of the resource being modified
333
+ " name " : " my-deployment" ,
334
+
335
+ # Namespace of the resource being modified, if the resource is namespaced (or is a Namespace object)
336
+ " namespace " : " my-namespace" ,
337
+
338
+ # operation can be CREATE, UPDATE, DELETE, or CONNECT
339
+ " operation " : " UPDATE" ,
340
+
341
+ " userInfo " : {
342
+ # Username of the authenticated user making the request to the API server
343
+ " username " : " admin" ,
344
+
345
+ # UID of the authenticated user making the request to the API server
346
+ " uid " : " 014fbff9a07c" ,
347
+
348
+ # Group memberships of the authenticated user making the request to the API server
349
+ " groups " : [
350
+ " system:authenticated" ,
351
+ " my-admin-group"
352
+ ],
353
+
354
+ # Arbitrary extra info associated with the user making the request to the API server
355
+ # This is populated by the API server authentication layer
356
+ " extra " : {
357
+ " some-key " : [
358
+ " some-value1" ,
359
+ " some-value2"
360
+ ]
361
+ }
362
+ },
363
+
364
+ # object is the new object being admitted. It is null for DELETE operations
365
+ " object " : {
366
+ " apiVersion " : " autoscaling/v1" ,
367
+ " kind " : " Scale"
368
+ },
369
+
370
+ # oldObject is the existing object. It is null for CREATE and CONNECT operations
371
+ " oldObject " : {
372
+ " apiVersion " : " autoscaling/v1" ,
373
+ " kind " : " Scale"
374
+ },
375
+
376
+ # options contain the options for the operation being admitted, like meta.k8s.io/v1 CreateOptions,
377
+ # UpdateOptions, or DeleteOptions. It is null for CONNECT operations
378
+ " options " : {
379
+ " apiVersion " : " meta.k8s.io/v1" ,
380
+ " kind " : " UpdateOptions"
381
+ },
382
+
383
+ # dryRun indicates the API request is running in dry run mode and will not be persisted
384
+ # Webhooks with side effects should avoid actuating those side effects when dryRun is true
385
+ " dryRun " : false
386
+ }
387
+ }
377
388
```
378
389
379
390
### Response
0 commit comments