--- # Copyright 2019 Nokia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. kubelet_kubeconfig_path: "{% if nodename | search('caas_master') %}/etc/kubernetes/kubeconfig/kubeletc.yml{% else %}/root/kubeletc.yml{% endif %}" common_kubelet_params: - "--hostname-override={{ networking.infra_internal.ip }}" - "--kubeconfig={{ kubelet_kubeconfig_path }}" - "--network-plugin=cni" - "--node-labels={{ lookup('template', 'node_labels.j2') | trim }}" - "--pod-infra-container-image={{ container_image_names | select('search', '/kubernetespause') | list | last }}" - "--register-node=true" master_kubelet_params: - "--config=/etc/kubernetes/kubeconfig/master-config.yaml" worker_kubelet_params: - "--bootstrap-kubeconfig=/etc/kubernetes/kubeconfig/kubelet-bootstrapc.yml" - "--config=/etc/kubernetes/kubeconfig/worker-config.yaml" kubectl_configs: - path: "/home/{{ users.admin_user_name }}/.kube/config" owner: "{{ users.admin_user_name }}" group: "{{ users.admin_user_name }}" kube_reserved_cpu: 0 total_cpus: "{{ ansible_local['cpu_allocation'].values() | map(attribute='set') | map('length') | sum }}" default_allocation: "{{ caas.cpu_allocation_mapping | get_mapped_key('pool_name', 'default') }}" default_cpu: "{{ ansible_local['cpu_allocation'].get(default_allocation, {}).get('set', []) | length }}" system_reserved_cpu: "{{ total_cpus|int - kube_reserved_cpu|int - default_cpu|int }}"