add kyverno policies

Signed-off-by: gwg313 <gwg313@pm.me>
This commit is contained in:
gwg313 2026-05-27 19:23:54 -04:00
parent 4be877e419
commit baa0216960
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
35 changed files with 843 additions and 39 deletions

View file

@ -0,0 +1,22 @@
apiVersion: kyverno.io/v2beta1
kind: ClusterCleanupPolicy
metadata:
name: cleanup-old-replicasets
spec:
match:
any:
- resources:
kinds:
- ReplicaSet
conditions:
all:
- key: "{{ target.spec.replicas || `0` }}"
operator: Equals
value: 0
- key: "{{ time_diff('{{ target.metadata.creationTimestamp }}','{{ time_now_utc() }}') }}"
operator: GreaterThan
value: 168h
schedule: "0 3 * * *"