Skip to content

Commit 22aa437

Browse files
committed
KEP-3221: Update evaluation / duration / fail-open metric details
1 parent 9945d2e commit 22aa437

File tree

2 files changed

+32
-13
lines changed

2 files changed

+32
-13
lines changed

keps/sig-auth/3221-structured-authorization-configuration/README.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -476,29 +476,42 @@ Labels {along with possible values}:
476476

477477
2. `apiserver_authorization_webhook_evaluations_total`
478478

479-
This will be incremented on round-trip of an authorization webhook. It will track
480-
total invocation counts across the following labels.
479+
This will be incremented on round-trip of an authorization webhook.
480+
It will track total invocation counts across the following labels.
481481

482-
- `name`
483-
- `code` {"incomplete_request", "bad_response"}
482+
- `name` {<authorizer_name>}
483+
- value matches the configuration `name` field
484+
- `code` {canceled, timeout, error, ok}
485+
- `canceled`: the call invoking the webhook request was canceled
486+
- `timeout`: the webhook request timed out
487+
- `error`: the webhook response completed and was invalid
488+
- `ok`: the webhook response completed and was well-formed
484489

485490
3. `apiserver_authorization_webhook_duration_seconds`
486491

487492
This is a Histogram metric that will track the total round trip time of the requests to the webhook.
488493

489494
Labels {along with possible values}:
490-
- `name`
491-
- `code` {"incomplete_request", "bad_response", "ok"}
495+
- `name` {<authorizer_name>}
496+
- value matches the configuration `name` field
497+
- `code` {canceled, timeout, error, ok}
498+
- `canceled`: the call invoking the webhook request was canceled
499+
- `timeout`: the webhook request timed out
500+
- `error`: the webhook response completed and was invalid
501+
- `ok`: the webhook response completed and was well-formed
492502

493503
4. `apiserver_authorization_webhook_evaluations_fail_open_total`
494504

495-
This metric will be incremented when a webhook returns `code != errAuthzWebhookOKCode` and
496-
decision on error is not set to `deny`.
505+
This metric will be incremented when a webhook request times out or
506+
returns an invalid response, and the failurePolicy is set to `NoOpinion`.
497507

498508
Labels {along with possible values}:
499509

500-
- `name`
501-
- `code` {"incomplete_request", "bad_response"}
510+
- `name` {<authorizer_name>}
511+
- value matches the configuration `name` field
512+
- `code` {timeout, error}
513+
- `timeout`: the webhook request timed out
514+
- `error`: the webhook response completed and was invalid
502515

503516
5. `apiserver_authorization_config_controller_automatic_reload_last_timestamp_seconds`
504517

keps/sig-auth/3221-structured-authorization-configuration/kep.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ feature-gates:
2727
- kube-apiserver
2828
disable-supported: true
2929
metrics:
30-
- apiserver_authorization_decisions_total
31-
- apiserver_authorization_config_controller_automatic_reload_last_timestamp_seconds
32-
- apiserver_authorization_config_controller_automatic_reloads_total{apiserver_id_hash, type}
30+
- apiserver_authorization_decisions_total{type, name, decision}
31+
- apiserver_authorization_webhook_duration_seconds{name, code}
32+
- apiserver_authorization_webhook_evaluations_total{name, code}
33+
- apiserver_authorization_webhook_evaluations_fail_open_total{name, code}
34+
- apiserver_authorization_config_controller_automatic_reload_last_timestamp_seconds{apiserver_id_hash, status}
35+
- apiserver_authorization_config_controller_automatic_reloads_total{apiserver_id_hash, status}
36+
- apiserver_authorization_match_condition_evaluation_errors_total{type, name}
37+
- apiserver_authorization_match_condition_exclusions_total{type, name}
38+
- apiserver_authorization_match_condition_evaluation_seconds{type, name}

0 commit comments

Comments
 (0)