From a3d3f27aaa1baabd4012cc7677f2c9db27da3062 Mon Sep 17 00:00:00 2001 From: Lee Spottiswood <me@lee.io> Date: Wed, 29 Apr 2020 07:34:25 +0100 Subject: [PATCH] allow dns autoscaler limits to be specified via variables (#6020) --- roles/kubernetes-apps/ansible/defaults/main.yml | 4 ++++ roles/kubernetes-apps/ansible/templates/dns-autoscaler.yml.j2 | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/kubernetes-apps/ansible/defaults/main.yml b/roles/kubernetes-apps/ansible/defaults/main.yml index a68ecec01..79afd33a2 100644 --- a/roles/kubernetes-apps/ansible/defaults/main.yml +++ b/roles/kubernetes-apps/ansible/defaults/main.yml @@ -15,6 +15,10 @@ nodelocaldns_cpu_requests: 100m nodelocaldns_memory_limit: 170Mi nodelocaldnsdns_memory_requests: 70Mi +# Limits for dns-autoscaler +dns_autoscaler_cpu_requests: 20m +dns_autoscaler_memory_requests: 10Mi + # Netchecker deploy_netchecker: false netchecker_port: 31081 diff --git a/roles/kubernetes-apps/ansible/templates/dns-autoscaler.yml.j2 b/roles/kubernetes-apps/ansible/templates/dns-autoscaler.yml.j2 index e30a68b3d..ce898a030 100644 --- a/roles/kubernetes-apps/ansible/templates/dns-autoscaler.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/dns-autoscaler.yml.j2 @@ -66,8 +66,8 @@ spec: image: "{{ dnsautoscaler_image_repo }}:{{ dnsautoscaler_image_tag }}" resources: requests: - cpu: "20m" - memory: "10Mi" + cpu: {{ dns_autoscaler_cpu_requests }} + memory: {{ dns_autoscaler_memory_requests }} command: - /cluster-proportional-autoscaler - --namespace=kube-system -- GitLab