X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=ansible%2Froles%2Fcpupooler%2Ftemplates%2Fcpu_pooler_config.yaml.j2;h=ce3a8043f6fda6ac419fc447ed2a482de1e80703;hb=2ec34f5210f5ca4a75132da4a33ffb1b85b5d3c7;hp=c138125e34486f83454e1dda093829727814bd21;hpb=14c6f30e697b2881ee33be007b71aa8817592327;p=ta%2Fcaas-cpupooler.git diff --git a/ansible/roles/cpupooler/templates/cpu_pooler_config.yaml.j2 b/ansible/roles/cpupooler/templates/cpu_pooler_config.yaml.j2 index c138125..ce3a804 100644 --- a/ansible/roles/cpupooler/templates/cpu_pooler_config.yaml.j2 +++ b/ansible/roles/cpupooler/templates/cpu_pooler_config.yaml.j2 @@ -21,12 +21,17 @@ limitations under the License. pools: {% set cpu_allocation = hostdata.get('ansible_local', {}).get('cpu_allocation', {}) %} {% for allocation_name, allocation in cpu_allocation.iteritems() %} - {% if allocation_name in cpu_allocation_mapping %} - {{ cpu_allocation_mapping[allocation_name]['pool_name'] }}: + {% if allocation_name in caas.cpu_allocation_mapping %} + {{ caas.cpu_allocation_mapping[allocation_name]['pool_name'] }}: cpus: "{{ allocation.get('list', '') }}" {% endif %} {% endfor %} nodeSelector: nodename: "{{ hostdata['nodename'] | default('') }}" + tolerations: + - key: "node-maintenancemode" + value: "enabled" + operator: "Equal" + effect: "NoExecute" {% endif %} {% endfor %}