2016-09-02 01:01:15 +08:00
|
|
|
---
|
2016-12-20 23:44:39 +08:00
|
|
|
- name: Kubernetes Apps | Wait for kube-apiserver
|
2017-02-18 05:22:34 +08:00
|
|
|
uri:
|
2017-11-07 04:01:10 +08:00
|
|
|
url: "{{ kube_apiserver_endpoint }}/healthz"
|
|
|
|
validate_certs: no
|
|
|
|
client_cert: "{{ kube_apiserver_client_cert }}"
|
|
|
|
client_key: "{{ kube_apiserver_client_key }}"
|
2016-12-20 23:44:39 +08:00
|
|
|
register: result
|
|
|
|
until: result.status == 200
|
2019-04-24 15:08:05 +08:00
|
|
|
retries: 20
|
|
|
|
delay: 1
|
2017-01-18 05:57:34 +08:00
|
|
|
when: inventory_hostname == groups['kube-master'][0]
|
2016-12-20 23:44:39 +08:00
|
|
|
|
2018-03-13 19:00:05 +08:00
|
|
|
- name: Kubernetes Apps | Cleanup DNS
|
2020-08-27 14:19:10 +08:00
|
|
|
import_tasks: cleanup_dns.yml
|
2018-03-13 19:00:05 +08:00
|
|
|
when:
|
|
|
|
- inventory_hostname == groups['kube-master'][0]
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- upgrade
|
2018-08-08 02:53:36 +08:00
|
|
|
- coredns
|
2018-12-11 09:28:03 +08:00
|
|
|
- nodelocaldns
|
2017-09-26 17:38:58 +08:00
|
|
|
|
2018-03-13 19:00:05 +08:00
|
|
|
- name: Kubernetes Apps | CoreDNS
|
2020-08-27 14:19:10 +08:00
|
|
|
import_tasks: "coredns.yml"
|
2017-09-14 02:00:51 +08:00
|
|
|
when:
|
2018-03-13 19:00:05 +08:00
|
|
|
- dns_mode in ['coredns', 'coredns_dual']
|
2017-09-14 02:00:51 +08:00
|
|
|
- inventory_hostname == groups['kube-master'][0]
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
2018-03-13 19:00:05 +08:00
|
|
|
- coredns
|
2017-06-27 12:27:25 +08:00
|
|
|
|
2018-12-11 09:28:03 +08:00
|
|
|
- name: Kubernetes Apps | nodelocalDNS
|
2020-08-27 14:19:10 +08:00
|
|
|
import_tasks: "nodelocaldns.yml"
|
2018-12-11 09:28:03 +08:00
|
|
|
when:
|
2019-04-17 23:42:03 +08:00
|
|
|
- enable_nodelocaldns
|
2018-12-11 09:28:03 +08:00
|
|
|
- inventory_hostname == groups['kube-master'] | first
|
|
|
|
tags:
|
|
|
|
- nodelocaldns
|
|
|
|
|
2016-09-02 01:01:15 +08:00
|
|
|
- name: Kubernetes Apps | Start Resources
|
|
|
|
kube:
|
2019-04-24 01:37:23 +08:00
|
|
|
name: "{{ item.item.name }}"
|
2018-03-30 19:29:13 +08:00
|
|
|
namespace: "kube-system"
|
2018-02-05 16:26:54 +08:00
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
2019-04-24 01:37:23 +08:00
|
|
|
resource: "{{ item.item.type }}"
|
|
|
|
filename: "{{ kube_config_dir }}/{{ item.item.file }}"
|
2017-09-05 13:23:12 +08:00
|
|
|
state: "latest"
|
2019-04-24 01:37:23 +08:00
|
|
|
with_items:
|
|
|
|
- "{{ coredns_manifests.results | default({}) }}"
|
|
|
|
- "{{ coredns_secondary_manifests.results | default({}) }}"
|
|
|
|
- "{{ nodelocaldns_manifests.results | default({}) }}"
|
2017-09-05 13:23:12 +08:00
|
|
|
when:
|
|
|
|
- dns_mode != 'none'
|
|
|
|
- inventory_hostname == groups['kube-master'][0]
|
2019-04-24 01:37:23 +08:00
|
|
|
- not item is skipped
|
2018-03-30 00:37:32 +08:00
|
|
|
register: resource_result
|
2018-10-17 06:33:30 +08:00
|
|
|
until: resource_result is succeeded
|
2018-03-30 00:37:32 +08:00
|
|
|
retries: 4
|
|
|
|
delay: 5
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
2018-08-08 02:53:36 +08:00
|
|
|
- coredns
|
2018-12-11 09:28:03 +08:00
|
|
|
- nodelocaldns
|
2019-04-24 01:37:23 +08:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.item.file }}"
|
2016-10-10 22:09:50 +08:00
|
|
|
|
2016-09-30 23:23:47 +08:00
|
|
|
- name: Kubernetes Apps | Netchecker
|
2020-08-27 14:19:10 +08:00
|
|
|
import_tasks: netchecker.yml
|
2016-09-30 23:23:47 +08:00
|
|
|
when: deploy_netchecker
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- netchecker
|
2017-09-10 04:38:03 +08:00
|
|
|
|
|
|
|
- name: Kubernetes Apps | Dashboard
|
2020-08-27 14:19:10 +08:00
|
|
|
import_tasks: dashboard.yml
|
2017-09-10 04:38:03 +08:00
|
|
|
when: dashboard_enabled
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- dashboard
|