17f07e2613
* Enable AutoScaler for CoreDNS * Only use one template for dns autoscaler * Rename a few variables for replicas and minimum pods * Rename a few variables for replicas and minimum pods * Remove replicas to make autoscale work * Cleanup kubedns-autoscaler as it has been renamed
66 lines
1.5 KiB
YAML
66 lines
1.5 KiB
YAML
---
|
|
- name: Kubernetes Apps | Delete old CoreDNS resources
|
|
kube:
|
|
name: "coredns"
|
|
namespace: "kube-system"
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
resource: "{{ item }}"
|
|
state: absent
|
|
with_items:
|
|
- 'deploy'
|
|
- 'configmap'
|
|
- 'svc'
|
|
tags:
|
|
- upgrade
|
|
|
|
- name: Kubernetes Apps | Delete kubeadm CoreDNS
|
|
kube:
|
|
name: "coredns"
|
|
namespace: "kube-system"
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
resource: "deploy"
|
|
state: absent
|
|
when:
|
|
- kubeadm_enabled|default(false)
|
|
- kubeadm_init is defined
|
|
- kubeadm_init.changed|default(false)
|
|
- inventory_hostname == groups['kube-master'][0]
|
|
|
|
- name: Kubernetes Apps | Delete old KubeDNS resources
|
|
kube:
|
|
name: "kube-dns"
|
|
namespace: "kube-system"
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
resource: "{{ item }}"
|
|
state: absent
|
|
with_items:
|
|
- 'deploy'
|
|
- 'svc'
|
|
tags:
|
|
- upgrade
|
|
|
|
- name: Kubernetes Apps | Delete kubeadm KubeDNS
|
|
kube:
|
|
name: "kube-dns"
|
|
namespace: "kube-system"
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
resource: "{{ item }}"
|
|
state: absent
|
|
with_items:
|
|
- 'deploy'
|
|
- 'svc'
|
|
when:
|
|
- kubeadm_enabled|default(false)
|
|
- kubeadm_init is defined
|
|
- kubeadm_init.changed|default(false)
|
|
- inventory_hostname == groups['kube-master'][0]
|
|
|
|
- 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
|