Closed hjacobs closed 5 years ago
Example rule evaluation logs:
DEBUG: Rule require-application-label with JMESPath "!(spec.template.metadata.labels.application)" evaluated for Deployment default/kube-janitor: False
DEBUG: Rule temporary-pr-deployments with JMESPath "starts_with(metadata.name, 'pr-')" evaluated for Deployment default/kube-janitor: False
DEBUG: Rule require-application-label with JMESPath "!(spec.template.metadata.labels.application)" evaluated for Deployment default/nginx: True
DEBUG: Rule require-application-label applies 4d TTL to Deployment default/nginx
DEBUG: Deployment nginx with TTL of 4d is 2:49:13.563265 old
For test or prototyping environments/clusters, it can be desirable to automatically calculate a TTL for resources based on certain rules, e.g.: