Skip to content

Commit 3fca820

Browse files
authored
ROX-24629: Filter PKO audit events (#2326)
1 parent 5f63ee8 commit 3fca820

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dp-terraform/helm/rhacs-terraform/charts/logging/templates/01-logging-03-cluster-log-forwarder.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,23 @@ spec:
2727
- cloudwatch-output
2828
filterRefs:
2929
- drop-package-operator
30+
- filter-kube-api-audit
3031
filters:
32+
# Drop package operator pod logs
3133
- name: drop-package-operator
3234
type: drop
3335
drop:
3436
- test:
3537
- field: .kubernetes.labels."app.kubernetes.io/name"
3638
matches: ^package-operator$
39+
# Filter kube-api events in the audit log groups
40+
- name: filter-kube-api-audit
41+
type: kubeAPIAudit
42+
kubeAPIAudit:
43+
rules:
44+
# Don't log patch, update, watch and get requests from package-operator as they occur most frequently.
45+
# It's worth keeping create and delete for audit purposes.
46+
# In a month, patch called ~40k times more than create.
47+
- level: None
48+
userGroups: ["system:serviceaccount:openshift-package-operator:package-operator"]
49+
verbs: ["patch", "update", "watch", "get"]

0 commit comments

Comments
 (0)