Skip to content

Commit e028169

Browse files
authored
Add selector to filter out Kubernetes jobs
Added a selector to exclude Kubernetes jobs from the pod filter.
1 parent b0f9227 commit e028169

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

example.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ rules:
4545
filterPath: |-
4646
status.phase == 'Failed' || status.phase == 'Succeeded'
4747
48-
selector: {}
48+
selector:
49+
matchExpressions:
50+
# exclude kubernetes jobs
51+
- { key: "batch.kubernetes.io/job-name", operator: DoesNotExist }
4952

5053
## run on all namespaces
5154
namespaceSelector: {}

0 commit comments

Comments
 (0)