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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 - role: kube_token_reading
18 when: nodename | search("caas_worker")
22 _gid: "{{ caas.uid.kube }}"
32 _uid: "{{ caas.uid.kube }}"
36 # kubelet server certs
38 instance: "kubelet{{ nodeindex }}"
39 cert_path: /etc/kubernetes/ssl
40 common_name: "system:node:{{ ansible_host }}"
41 org_name: "system:nodes"
45 - path: /etc/kubernetes/kubeconfig/kubeletc.yml
46 apiserver: "{{ caas.apiserver_svc_ip }}"
47 apiserver_port: "{{ caas.apiserver_svc_port }}"
51 when: nodename | search("caas_master")
54 path: /etc/kubernetes/kubeconfig/kubelet-bootstrapc.yml
58 user: "system:node:{{ ansible_host }}"
59 token: "{{ kube_token }}"
60 apiserver: "{{ caas.apiserver_in_hosts }}"
61 apiserver_port: "{{ caas.apiserver_secure_port }}"
66 when: nodename | search("caas_worker")
69 instance: "kubelet-server"
70 cert_path: /etc/kubernetes/ssl
71 common_name: "kubelet-server"
74 - "{{ ansible_host }}"
79 instance: "kube-admin"
80 cert_path: /etc/kubernetes/ssl
81 common_name: "kube-admin"
82 org_name: "system:masters"
84 - path: "/root/.kube/config"
85 apiserver: "{{ caas.apiserver_svc_ip }}"
86 apiserver_port: "{{ caas.apiserver_svc_port }}"
92 cert_path: /etc/kubernetes/ssl
95 - path: "/etc/kubernetes/kubeconfig/danmc.yml"
96 apiserver: "{{ caas.apiserver_svc_ip }}"
97 apiserver_port: "{{ caas.apiserver_svc_port }}"
101 - role: docker_image_load