@@ -609,39 +609,23 @@ pod_security_evaluations_total
609
609
610
610
The metric will use the following labels:
611
611
612
- 1 . ` decision {allow, deny, exempt , error} ` - The policy decision. Error is reserved for panics or
612
+ 1 . ` decision {exempt, allow, deny , error} ` - The policy decision. Error is reserved for panics or
613
613
other errors in policy evaluation. Update requests that are out of scope (see [ Updates] ( #updates )
614
614
above) are not counted.
615
615
3 . ` policy_level {privileged, baseline, restricted} ` - The policy level that the request was
616
616
evaluated against.
617
- 4 . ` policy_version {latest, v1.YY, >v1.ZZ} ` - The policy version that was used for the evaluation.
618
- How to constrain cardinality is unresolved (see below).
617
+ 4 . ` policy_version {v1.X, v1.Y, latest, future} ` - The policy version that was used for the evaluation.
618
+ Explicit versions less than or equal to the build of the API server or webhook are recorded in the form ` v1.x ` (e.g. ` v1.22 ` ).
619
+ Explicit versions greater than the build of the API server or webhook (which are evaluated as ` latest ` ) are recorded as ` future ` .
620
+ Explicit use of the ` latest ` version or implicit use by omitting a version or specifying an unparseable version will be recorded as ` latest ` .
619
621
5 . ` mode {enforce, warn, audit} ` - The type of evaluation mode being recorded. Note that a single
620
622
request can increment this metric 3 times, once for each mode. If this admission controller is
621
623
enabled, every every create request and in-scope update request will at least increment the
622
- ` enforce ` total.
624
+ ` enforce ` total. Privileged evaluations for warn and audit modes are not counted.
623
625
6 . ` request_operation {create, update} ` - The operation of the request being checked.
624
626
7 . ` resource {pod, controller} ` - Whether the request object is a Pod, or a [ templated
625
627
pod] ( #podtemplate-resources ) resource.
626
628
627
- <<[ UNRESOLVED] >>
628
-
629
- _ Non-blocking: can be decided on the implementing PR_
630
-
631
- How should policy version labels be handled, to control cardinality? Specifically:
632
- - How should future versions be labeled?
633
- - How should (very old) past versions be labeled?
634
-
635
- Ideas:
636
- - If the version is set higher than ` v{latest+1} ` , then ` >v{latest+1} `
637
- will be used. In other words, if the current version of the admission controller is v1.22, then a
638
- version of ` v1.23 ` would be unchanged, but ` v1.24 ` would be recorded as ` >v1.23 ` .
639
- - Concern that the sliding-window approach will cause issues with historical data.
640
- - If the version is set higher than latest, simply record it as ` future ` . Allow recording of all
641
- past versions.
642
-
643
- <<[ /UNRESOLVED] >>
644
-
645
629
### Audit Annotations
646
630
647
631
The following audit annotations will be added:
0 commit comments