Skip to content

Commit d0cacda

Browse files
committed
2579: metrics
1 parent 12edf13 commit d0cacda

File tree

2 files changed

+7
-23
lines changed

2 files changed

+7
-23
lines changed

keps/sig-auth/2579-psp-replacement/README.md

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -609,39 +609,23 @@ pod_security_evaluations_total
609609

610610
The metric will use the following labels:
611611

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
613613
other errors in policy evaluation. Update requests that are out of scope (see [Updates](#updates)
614614
above) are not counted.
615615
3. `policy_level {privileged, baseline, restricted}` - The policy level that the request was
616616
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`.
619621
5. `mode {enforce, warn, audit}` - The type of evaluation mode being recorded. Note that a single
620622
request can increment this metric 3 times, once for each mode. If this admission controller is
621623
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.
623625
6. `request_operation {create, update}` - The operation of the request being checked.
624626
7. `resource {pod, controller}` - Whether the request object is a Pod, or a [templated
625627
pod](#podtemplate-resources) resource.
626628

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-
645629
### Audit Annotations
646630

647631
The following audit annotations will be added:

keps/sig-auth/2579-psp-replacement/kep.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ disable-supported: true
5252

5353
# The following PRR answers are required at beta release
5454
metrics:
55-
- TBD
55+
- pod_security_evaluations_total

0 commit comments

Comments
 (0)