fix(clustertool): fully remove topolvm and add kyverno by default

This commit is contained in:
Kjeld Schouten
2024-10-24 10:47:47 +02:00
parent a71ee15f6d
commit c43f2bab7d
3 changed files with 10 additions and 32 deletions
@@ -4,4 +4,3 @@ kind: Kustomization
resources:
- schematic-to-pod.yaml
- ensure-digest.yaml
- safe-to-evict.yaml
@@ -1,29 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: add-safe-to-evict
annotations:
policies.kyverno.io/title: Add Safe To Evict
policies.kyverno.io/category: Other
policies.kyverno.io/subject: Pod,Annotation
policies.kyverno.io/minversion: 1.6.0
policies.kyverno.io/description: >-
The Kubernetes cluster autoscaler does not evict pods that
use hostPath or emptyDir volumes. To allow eviction of these pods, the annotation
cluster-autoscaler.kubernetes.io/safe-to-evict=true must be added to the pods.
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): {}