@@ -300,8 +300,10 @@ start if the configuration is invalid.
300
300
The API server will periodically reload the configuration. If it changes, the
301
301
new configuration will be used for the Authorizer chain. If the new configuration
302
302
is invalid, the last known valid configuration will be used. The reloader will also
303
- check if the webhook exists, thereby preventing any typo/misconfiguration with the
304
- Webhook resulting in bad Authorizer config. Logging and metrics would be used to
303
+ check if the webhook is healthy, thereby preventing any typo/misconfiguration with the
304
+ Webhook resulting in bad Authorizer config. If healthcheck on the wehobook failed, the
305
+ last known good config will be used. The time-based loop will try later and when webhook
306
+ health comes back, the new config will be used. Logging and metrics would be used to
305
307
signal success/failure of a config reload so that cluster admins can have
306
308
observability over this process.Reload must not add or remove Node or RBAC
307
309
authorizers. They can be reordered, but cannot be added or removed.
@@ -439,7 +441,7 @@ This will be incremented on round-trip of an authorizer. It will track total
439
441
authorization decision invocations across the following labels.
440
442
441
443
Labels {along with possible values} :
442
- - ` mode` {<authorizer_name>}
444
+ - ` mode` {<authorizer_name>} # when authorizer is a webhook, prepend `webhook_`
443
445
- ` decision` {Allow, Deny}
444
446
445
447
**Note:** Some examples of <authorizer_name>: `RBAC`, `Node`, `ABAC`, `webhook{,_<name>}`.
@@ -461,19 +463,20 @@ Labels {along with possible values}:
461
463
- ` name`
462
464
- ` code` {"incomplete_request", "bad_response", "ok"}
463
465
464
- 4. `apiserver_authorization_step_webhook_error_total `
466
+ 4. `apiserver_authorization_webhook_evaluations_fail_open_total `
465
467
466
- This metric will be incremented when a webhook returns a 4xx or 5xx (erroneous) response.
468
+ This metric will be incremented when a webhook returns `code != errAuthzWebhookOKCode` and
469
+ decision on error is not set to `deny`.
467
470
468
471
Labels {along with possible values} :
469
472
470
473
- ` name`
471
- - ` code` {4xx, 5xx }
472
- - ` decision` {Deny, NoOpinion}
474
+ - ` code` {"incomplete_request", "bad_response" }
475
+ - ` decision` {NoOpinion}
473
476
474
477
5. `apiserver_authorization_configuration_reload_last_timestamp_seconds`
475
478
476
- The last time in seconds when an authorization reload was performed.
479
+ This Gauge metric will record last time in seconds when an authorization reload was performed.
477
480
- ` status` {success, fail}
478
481
479
482
# ## Test Plan
@@ -638,7 +641,7 @@ Or, they can look at the metrics exposed by `kube-apiserver`.
638
641
639
642
# ##### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
640
643
641
- The total number of `apiserver_authorization_step_webhook_error_total ` metric with failure code
644
+ The total number of `apiserver_authorization_webhook_evaluations_fail_open_total ` metric with failure code
642
645
is within reasonable limits. A rising value indicates issues with either the
643
646
authorizer chain or the webhook itself.
644
647
0 commit comments