2018-03-13 19:00:05 +08:00
|
|
|
---
|
|
|
|
- name: Kubernetes Apps | Delete old CoreDNS resources
|
|
|
|
kube:
|
|
|
|
name: "coredns"
|
2018-03-30 19:29:13 +08:00
|
|
|
namespace: "kube-system"
|
2018-03-13 19:00:05 +08:00
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
|
|
resource: "{{ item }}"
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- 'deploy'
|
|
|
|
- 'configmap'
|
|
|
|
- 'svc'
|
|
|
|
tags:
|
|
|
|
- upgrade
|
|
|
|
|
2018-12-11 09:28:03 +08:00
|
|
|
- name: Kubernetes Apps | Delete old nodelocalDNS resources
|
|
|
|
kube:
|
|
|
|
name: "nodelocaldns"
|
|
|
|
namespace: "kube-system"
|
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
|
|
resource: "{{ item }}"
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- 'deamonset'
|
|
|
|
- 'configmap'
|
|
|
|
tags:
|
|
|
|
- upgrade
|
|
|
|
|
2018-03-13 19:00:05 +08:00
|
|
|
- name: Kubernetes Apps | Delete kubeadm CoreDNS
|
|
|
|
kube:
|
|
|
|
name: "coredns"
|
2018-03-30 19:29:13 +08:00
|
|
|
namespace: "kube-system"
|
2018-03-13 19:00:05 +08:00
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
|
|
resource: "deploy"
|
|
|
|
state: absent
|
|
|
|
when:
|
2018-10-08 16:22:57 +08:00
|
|
|
- kubeadm_init is defined
|
2018-03-13 19:00:05 +08:00
|
|
|
- kubeadm_init.changed|default(false)
|
|
|
|
- inventory_hostname == groups['kube-master'][0]
|
|
|
|
|
|
|
|
- name: Kubernetes Apps | Delete old KubeDNS resources
|
|
|
|
kube:
|
|
|
|
name: "kube-dns"
|
2018-03-30 19:29:13 +08:00
|
|
|
namespace: "kube-system"
|
2018-03-13 19:00:05 +08:00
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
|
|
resource: "{{ item }}"
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- 'deploy'
|
|
|
|
- 'svc'
|
|
|
|
tags:
|
|
|
|
- upgrade
|
|
|
|
|
|
|
|
- name: Kubernetes Apps | Delete kubeadm KubeDNS
|
|
|
|
kube:
|
|
|
|
name: "kube-dns"
|
2018-03-30 19:29:13 +08:00
|
|
|
namespace: "kube-system"
|
2018-03-13 19:00:05 +08:00
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
|
|
resource: "{{ item }}"
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- 'deploy'
|
|
|
|
- 'svc'
|
|
|
|
when:
|
2018-10-08 16:22:57 +08:00
|
|
|
- kubeadm_init is defined
|
2018-03-13 19:00:05 +08:00
|
|
|
- kubeadm_init.changed|default(false)
|
|
|
|
- inventory_hostname == groups['kube-master'][0]
|
2018-11-15 17:28:03 +08:00
|
|
|
|
|
|
|
- name: Kubernetes Apps | Delete old KubeDNS Autoscaler deployment
|
|
|
|
kube:
|
|
|
|
name: "kubedns-autoscaler"
|
|
|
|
namespace: "kube-system"
|
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
|
|
resource: "deploy"
|
|
|
|
state: absent
|
|
|
|
tags:
|
|
|
|
- upgrade
|