Compress image using xz
[ta/caas-kubernetes.git] / ansible / roles / kubelet / defaults / main.yaml
1 ---
2 # Copyright 2019 Nokia
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 kubelet_kubeconfig_path: "{% if nodename | search('caas_master') %}/etc/kubernetes/kubeconfig/kubeletc.yml{% else %}/root/kubeletc.yml{% endif %}"
17
18 common_kubelet_params:
19   - "--hostname-override={{ networking.infra_internal.ip }}"
20   - "--kubeconfig={{ kubelet_kubeconfig_path }}"
21   - "--network-plugin=cni"
22   - "--node-labels={{ lookup('template', 'node_labels.j2') | trim }}"
23   - "--pod-infra-container-image={{ container_image_names | select('search', '/kubernetespause') | list | last }}"
24   - "--register-node=true"
25
26 master_kubelet_params:
27   - "--config=/etc/kubernetes/kubeconfig/master-config.yaml"
28
29 worker_kubelet_params:
30   - "--bootstrap-kubeconfig=/etc/kubernetes/kubeconfig/kubelet-bootstrapc.yml"
31   - "--config=/etc/kubernetes/kubeconfig/worker-config.yaml"
32
33 kubectl_configs:
34   - path: "/home/{{ users.admin_user_name }}/.kube/config"
35     owner: "{{ users.admin_user_name }}"
36     group: "{{ users.admin_user_name }}"
37
38 kube_reserved_cpu: 0
39 total_cpus: "{{ ansible_local['cpu_allocation'].values() | map(attribute='set') | map('length') | sum }}"
40 default_allocation: "{{ caas.cpu_allocation_mapping | get_mapped_key('pool_name', 'default') }}"
41 default_cpu: "{{ ansible_local['cpu_allocation'].get(default_allocation, {}).get('set', []) | length }}"
42 system_reserved_cpu: "{{ total_cpus|int - kube_reserved_cpu|int - default_cpu|int  }}"