From a3f8bb03692a32bb2d76e933a238ae4d492bf6f2 Mon Sep 17 00:00:00 2001 From: Sean Malloy Date: Thu, 19 Nov 2020 23:57:23 -0600 Subject: [PATCH] Set Container Resources In YAML Manifests Prior to this commit the YAML manifests used to install the descheduler Job and CronJob did not set container requests or limits. This is considered an anti-pattern when deploying applications on k8s. Set descheduler container resources to make it a burstable pod. This will ensure a high quality experience for end users when deploying descheduler into their clusters using the instructions from the README. The values choosen for CPU/Memory are not based on any real data. --- kubernetes/cronjob/cronjob.yaml | 4 ++++ kubernetes/job/job.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/kubernetes/cronjob/cronjob.yaml b/kubernetes/cronjob/cronjob.yaml index 9544c4db2..a867844d5 100644 --- a/kubernetes/cronjob/cronjob.yaml +++ b/kubernetes/cronjob/cronjob.yaml @@ -27,6 +27,10 @@ spec: - "/policy-dir/policy.yaml" - "--v" - "3" + resources: + requests: + cpu: "500m" + memory: "256Mi" restartPolicy: "Never" serviceAccountName: descheduler-sa volumes: diff --git a/kubernetes/job/job.yaml b/kubernetes/job/job.yaml index 2faa9baff..71a480699 100644 --- a/kubernetes/job/job.yaml +++ b/kubernetes/job/job.yaml @@ -25,6 +25,10 @@ spec: - "/policy-dir/policy.yaml" - "--v" - "3" + resources: + requests: + cpu: "500m" + memory: "256Mi" restartPolicy: "Never" serviceAccountName: descheduler-sa volumes: