1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 09:26:54 +00:00
kyverno/samples/best_practices/add_safe-to-evict_annotation.yaml
2019-11-04 17:55:13 -08:00

22 lines
No EOL
521 B
YAML

apiVersion: "kyverno.io/v1alpha1"
kind: "ClusterPolicy"
metadata:
name: "annotate-emptyDir"
annotations:
policies.kyverno.io/category: AutoScaling
policies.kyverno.io/description:
spec:
rules:
- name: "add-safe-to-evict-annotation"
match:
resources:
kinds:
- "Pod"
mutate:
overlay:
metadata:
annotations:
+(cluster-autoscaler.kubernetes.io/safe-to-evict): true
spec:
volumes:
- (emptyDir): {}