update
Signed-off-by: gwg313 <gwg313@pm.me>
This commit is contained in:
parent
bfe8435665
commit
8d74a625bc
37 changed files with 224 additions and 103 deletions
21
platform/kyverno/policies/purge-terminal-pods.yaml
Normal file
21
platform/kyverno/policies/purge-terminal-pods.yaml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
apiVersion: kyverno.io/v2beta1
|
||||
kind: ClusterCleanupPolicy
|
||||
metadata:
|
||||
name: purge-terminal-pods
|
||||
spec:
|
||||
match:
|
||||
any:
|
||||
- resources:
|
||||
kinds:
|
||||
- Pod
|
||||
schedule: "*/15 * * * *"
|
||||
conditions:
|
||||
all:
|
||||
- key: "{{ request.object.status.phase }}"
|
||||
operator: AnyIn
|
||||
value:
|
||||
- Succeeded
|
||||
- Failed
|
||||
- key: "{{ request.object.metadata.creationTimestamp }}"
|
||||
operator: DurationGreaterThan
|
||||
value: 30m
|
||||
Loading…
Add table
Add a link
Reference in a new issue