Merge pull request #54634 from CaoShuFeng/omit_stage
Automatic merge from submit-queue (batch tested with PRs 52322, 54634). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
[advanced audit]add a policy wide omitStage
Related to: https://github.com/kubernetes/kubernetes/issues/54551
For example:
1. only log panic events
```
apiVersion: audit.k8s.io/v1beta1
kind: Policy
omitStages:
- "RequestReceived"
- "ResponseStarted"
- "ResponseComplete"
rules:
- level: Request
```
2. only log events inRequestReceived stage:
```
apiVersion: audit.k8s.io/v1beta1
kind: Policy
omitStages:
- "ResponseStarted"
- "ResponseComplete"
- "Panic"
rules:
- level: Request
```
**Release note**:
```
support a policy wide omitStage for advanced audit
```
Showing
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment