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