From efaca25ffb37712fec8fc69a54940c798ac301c7 Mon Sep 17 00:00:00 2001 From: Ritikaa96 Date: Mon, 12 Aug 2024 09:34:03 +0530 Subject: [PATCH 1/2] registering apiserver.latency.k8s.io/total annotation Signed-off-by: Ritikaa96 --- .../labels-annotations-taints/audit-annotations.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/content/en/docs/reference/labels-annotations-taints/audit-annotations.md b/content/en/docs/reference/labels-annotations-taints/audit-annotations.md index 2698cc2657941..b7fab6fe83d6a 100644 --- a/content/en/docs/reference/labels-annotations-taints/audit-annotations.md +++ b/content/en/docs/reference/labels-annotations-taints/audit-annotations.md @@ -72,11 +72,19 @@ violated from the PodSecurity enforcement. See [Pod Security Standards](/docs/concepts/security/pod-security-standards/) for more information. +## apiserver.latency.k8s.io/total + +Example: `apiserver.latency.k8s.io/total: "573.018706ms"` + +This value shows total latency incurred in components within the apiserver. Please note that the latency is recorded in +annotation only when the total latency of the given request exceeds 500ms; This is in keeping with the +traces in rest/handlers for create, delete, update, get, list, and delete collection. + ## authorization.k8s.io/decision Example: `authorization.k8s.io/decision: "forbid"` -This annotation indicates whether or not a request was authorized in Kubernetes audit logs. +Value must be **forbid** or **allow**. This annotation indicates whether or not a request was authorized in Kubernetes audit logs. See [Auditing](/docs/tasks/debug/debug-cluster/audit/) for more information. From 4a53adffee158916bb92968e1f6edbacca0422a0 Mon Sep 17 00:00:00 2001 From: Ritikaa96 Date: Thu, 22 Aug 2024 15:39:02 +0530 Subject: [PATCH 2/2] adding suggested changes Signed-off-by: Ritikaa96 --- .../labels-annotations-taints/audit-annotations.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/content/en/docs/reference/labels-annotations-taints/audit-annotations.md b/content/en/docs/reference/labels-annotations-taints/audit-annotations.md index b7fab6fe83d6a..25b8b6622e5eb 100644 --- a/content/en/docs/reference/labels-annotations-taints/audit-annotations.md +++ b/content/en/docs/reference/labels-annotations-taints/audit-annotations.md @@ -76,15 +76,16 @@ for more information. Example: `apiserver.latency.k8s.io/total: "573.018706ms"` -This value shows total latency incurred in components within the apiserver. Please note that the latency is recorded in -annotation only when the total latency of the given request exceeds 500ms; This is in keeping with the -traces in rest/handlers for create, delete, update, get, list, and delete collection. +This annotation records total latency incurred in components within the API server. +The API server only adds this audit annotation for requests where the total latency for handling +and responding to that request exceeds a threshold; in Kubernetes {{< skew currentVersion >}} +that threshold is 500ms (half a second). ## authorization.k8s.io/decision Example: `authorization.k8s.io/decision: "forbid"` -Value must be **forbid** or **allow**. This annotation indicates whether or not a request was authorized in Kubernetes audit logs. +This annotation indicates whether or not a request was authorized in Kubernetes audit logs. See [Auditing](/docs/tasks/debug/debug-cluster/audit/) for more information.