@@ -411,6 +411,17 @@ k8s.io/apiserver/pkg/endpoints/request: 65.4% of statements
411
411
k8s.io/apiserver/plugin/pkg/authorizer/webhook: 86.6% of statements
412
412
```
413
413
414
+ Unit tests exercise node authorization, CEL compilation for authorization webhook and admission ` matchConditions ` ,
415
+ and CEL compilation for authorizer use with and without the feature enabled:
416
+
417
+ https://github.com/kubernetes/kubernetes/blob/0b1d123fd040359da11dc772947a7908ee907910/plugin/pkg/auth/authorizer/node/node_authorizer_test.go#L75-L81
418
+
419
+ https://github.com/kubernetes/kubernetes/blob/0b1d123fd040359da11dc772947a7908ee907910/staging/src/k8s.io/apiserver/pkg/authorization/cel/compile_test.go#L34
420
+
421
+ https://github.com/kubernetes/kubernetes/blob/0b1d123fd040359da11dc772947a7908ee907910/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1_test.go#L806
422
+
423
+ https://github.com/kubernetes/kubernetes/blob/0b1d123fd040359da11dc772947a7908ee907910/staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/filter_test.go#L503-L620
424
+
414
425
##### Integration tests
415
426
416
427
<!--
@@ -500,6 +511,22 @@ enhancement:
500
511
cluster required to make on upgrade, in order to make use of the enhancement?
501
512
-->
502
513
514
+ On upgrade to a version that enables the feature, no configuration changes are required
515
+ to maintain previous behavior of CEL expressions and authorization webhooks.
516
+ All existing CEL expressions and authorization webhook responses behave identically.
517
+
518
+ On upgrade to a version that enables the feature, to make use of the new feature:
519
+ * authorization webhooks can inspect incoming SubjectAccessReview requests for field and label selector information
520
+ * authorization webhook configuration files can include ` matchConditions ` that inspect field and label selector information
521
+ * admission webhook API ` matchConditions ` can use authorizer fieldSelector / labelSelector functions
522
+ * SubjectAccessReview API requests can specify fieldSelector / labelSelector fields
523
+
524
+ On downgrade to a version that does not enable the feature by default, or if the feature is disabled:
525
+ * field and label selector information will no longer be sent to authorization webhooks
526
+ * authorization webhook configuration files can no longer include ` matchConditions ` that inspect field and label selector information
527
+ * admission webhook API ` matchConditions ` use authorizer fieldSelector / labelSelector functions will not error, but will no-op
528
+ * SubjectAccessReview API requests that specify fieldSelector / labelSelector fields will drop those fields
529
+
503
530
### Version Skew Strategy
504
531
505
532
#### New kube-apiserver, old webhook authorizer
@@ -575,6 +602,8 @@ The kube-apiserver will send field and label selector information to authorizati
575
602
576
603
Yes. Integration tests exercise behavior of CEL expressions with the feature enabled and disabled.
577
604
605
+ https://github.com/kubernetes/kubernetes/tree/0b1d123fd040359da11dc772947a7908ee907910/test/integration/apiserver/cel/authorizerselector
606
+
578
607
### Rollout, Upgrade and Rollback Planning
579
608
580
609
<!--
0 commit comments