We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e088f9 commit b0f9227Copy full SHA for b0f9227
1 file changed
example.yaml
@@ -50,6 +50,28 @@ rules:
50
## run on all namespaces
51
namespaceSelector: {}
52
53
+ # cleanup of evicted pods which are not yet removed by the Kubernetes control plane
54
+ - id: CleanupEvictedPods
55
+ ## ttl, calculated against terminated.finishedAt
56
+ ttl: 15m
57
+ resources:
58
+ - group: ""
59
+ version: v1
60
+ kind: pods
61
+
62
+ ## get timestampo from containerStatuses if pod is terminated
63
+ timestampPath: |-
64
+ max(status.containerStatuses[*].lastState.terminated.finishedAt)
65
66
+ ## filter only pods which are in phase "Failed" or "Succeeded"
67
+ filterPath: |-
68
+ status.reason == 'Evicted'
69
70
+ selector: {}
71
72
+ ## run on all namespaces
73
+ namespaceSelector: {}
74
75
- id: example
76
# resources expires 1 hour after creation
77
ttl: 1h
0 commit comments