From 2546eb255919dd735c087436f7f1f91d1ef9fe31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Masset?= Date: Wed, 1 Jun 2022 10:28:02 +0200 Subject: [PATCH] Added new configuration item for extra tolerations in DNS autoscaler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Masset --- roles/kubernetes-apps/ansible/defaults/main.yml | 1 + roles/kubernetes-apps/ansible/templates/dns-autoscaler.yml.j2 | 3 +++ 2 files changed, 4 insertions(+) diff --git a/roles/kubernetes-apps/ansible/defaults/main.yml b/roles/kubernetes-apps/ansible/defaults/main.yml index 9e9d6557d..e193eeceb 100644 --- a/roles/kubernetes-apps/ansible/defaults/main.yml +++ b/roles/kubernetes-apps/ansible/defaults/main.yml @@ -24,6 +24,7 @@ nodelocaldns_secondary_prometheus_port: 9255 dns_autoscaler_cpu_requests: 20m dns_autoscaler_memory_requests: 10Mi dns_autoscaler_deployment_nodeselector: "kubernetes.io/os: linux" +# dns_autoscaler_extra_tolerations: [{effect: NoSchedule, operator: "Exists"}] # etcd metrics # etcd_metrics_service_labels: diff --git a/roles/kubernetes-apps/ansible/templates/dns-autoscaler.yml.j2 b/roles/kubernetes-apps/ansible/templates/dns-autoscaler.yml.j2 index d6cba1dd7..6ea165183 100644 --- a/roles/kubernetes-apps/ansible/templates/dns-autoscaler.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/dns-autoscaler.yml.j2 @@ -45,6 +45,9 @@ spec: key: node-role.kubernetes.io/master - effect: NoSchedule key: node-role.kubernetes.io/control-plane +{% if dns_autoscaler_extra_tolerations is defined %} + {{ dns_autoscaler_extra_tolerations | list | to_nice_yaml(indent=2) | indent(8) }} +{% endif %} affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: