update descheduler image and config

This commit is contained in:
viktorbarzin 2021-05-12 00:25:42 +01:00
parent 3ba28a4594
commit f3c348eb9d

View file

@ -71,34 +71,36 @@ resource "kubernetes_config_map" "policy" {
} }
data = { data = {
"policy.yaml" = <<-EOF "policy.yaml" = <<-EOF
apiVersion: "descheduler/v1alpha1" apiVersion: "descheduler/v1alpha1"
maxNoOfPodsToEvictPerNode: 5 maxNoOfPodsToEvictPerNode: 5
kind: "DeschedulerPolicy" kind: "DeschedulerPolicy"
strategies: strategies:
"RemoveDuplicates": "RemoveDuplicates":
enabled: true enabled: true
"RemovePodsViolatingInterPodAntiAffinity": "RemovePodsViolatingInterPodAntiAffinity":
enabled: true enabled: true
"LowNodeUtilization": "LowNodeUtilization":
enabled: true enabled: true
params: params:
nodeResourceUtilizationThresholds: nodeResourceUtilizationThresholds:
thresholds: thresholds:
"cpu" : 20 "cpu" : 50
"memory": 20 "memory": 30
"pods": 20 "pods": 20
targetThresholds: targetThresholds:
"cpu" : 50 "cpu" : 70
"memory": 50 "memory": 30
"pods": 50 "pods": 50
"PodLifeTime": "PodLifeTime":
enabled: true enabled: true
params: params:
maxPodLifeTimeSeconds: 86400 podLifeTime:
namespaces: maxPodLifeTimeSeconds: 604800
exclude: namespaces:
- "monitoring" exclude:
- "kube-system" - "bind"
- "monitoring"
- "kube-system"
EOF EOF
} }
} }
@ -124,7 +126,7 @@ resource "kubernetes_cron_job" "descheduler" {
priority_class_name = "system-cluster-critical" priority_class_name = "system-cluster-critical"
container { container {
name = "descheduler" name = "descheduler"
image = "us.gcr.io/k8s-artifacts-prod/descheduler/descheduler:v0.18.0" image = "k8s.gcr.io/descheduler/descheduler:v0.20.0"
volume_mount { volume_mount {
mount_path = "/policy-dir" mount_path = "/policy-dir"
name = "policy-volume" name = "policy-volume"