@@ -630,22 +630,21 @@ The metric will use the following labels:
630
630
631
631
The following audit annotations will be added:
632
632
633
- 1 . ` pod-security.kubernetes.io/enforce-policy = <policy_level>:<resolved_version> ` Record which policy was evaluated
633
+ 1 . ` pod-security.kubernetes.io/enforce-policy = " <policy_level>:<version>" ` - Record which policy was evaluated
634
634
for enforcing mode.
635
- - Resolved version is the actual version of the policy that was evaluated, so in the case of
636
- ` latest ` or future versions, it will be ` latest@<version> ` where ` <version> ` is the tagged
637
- version of the apiserver or webhook (e.g.
` [email protected] ` ).
635
+ - version is ` latest ` or a specific version in the form ` v1.x `
638
636
- This annotation is only recorded when a policy is enforced. Specifically, it will not be
639
637
recorded for irrelevant updates or exempt requests.
640
- 2 . ` pod-security.kubernetes.io/audit-policy = <policy_level>:<resolved_version> ` Same as ` enforce-policy ` , but for
641
- audit mode policies (only included when an audit policy is set).
642
- 3 . ` pod-security.kubernetes.io/enforce-violations = <policy violations> ` When an enforcing policy is violated, record
643
- the violations here.
644
- 4 . ` pod-security.kubernetes.io/audit-violations = <policy violations> ` When an audit mode policy is violated, record
645
- the violations here.
646
- 5 . ` pod-security.kubernetes.io/exempt = [user, namespace, runtimeClass] ` For exempt requests, record the parameters
647
- that triggered the exemption here.
648
-
638
+ 2 . ` pod-security.kubernetes.io/audit-violations = "<policy violations>" ` - When an audit mode policy is violated, record
639
+ the violation messages here.
640
+ 3 . ` pod-security.kubernetes.io/exempt = "namespace" | "user" | "runtimeClass" ` - For exempt requests, record the parameter
641
+ that triggered the exemption here. If multiple parameters are exempt, the first in this ordered list will be returned:
642
+ - namespace
643
+ - user
644
+ - runtimeClass
645
+ 4 . ` pod-security.kubernetes.io/error = "<evaluation errors>" ` - Errors evaluating policies are recorded here
646
+
647
+ Violation messages returned by enforcing policies are included in the ` responseStatus ` portion of audit events in the ` ResponseComplete ` stage.
649
648
650
649
### PodSecurityPolicy Migration
651
650
0 commit comments