mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 01:16:55 +00:00
35 lines
771 B
YAML
35 lines
771 B
YAML
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: add-safe-to-evict
|
|
spec:
|
|
rules:
|
|
- name: annotate-empty-dir
|
|
match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Pod
|
|
mutate:
|
|
patchStrategicMerge:
|
|
metadata:
|
|
annotations:
|
|
+(cluster-autoscaler.kubernetes.io/safe-to-evict): "true"
|
|
spec:
|
|
volumes:
|
|
- <(emptyDir): {}
|
|
- name: annotate-host-path
|
|
match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Pod
|
|
mutate:
|
|
patchStrategicMerge:
|
|
metadata:
|
|
annotations:
|
|
+(cluster-autoscaler.kubernetes.io/safe-to-evict): "true"
|
|
spec:
|
|
volumes:
|
|
- hostPath:
|
|
<(path): "*"
|