kubeasz/roles/cluster-addon/tasks/nodelocaldns.yml

19 lines
764 B
YAML
Raw Normal View History

- block:
- name: 准备dnscache的部署文件
template: src=dns/nodelocaldns-ipvs.yaml.j2 dest={{ cluster_dir }}/yml/nodelocaldns.yaml
when: "PROXY_MODE == 'ipvs'"
2021-01-13 21:27:18 +08:00
- name: 准备dnscache的部署文件
template: src=dns/nodelocaldns-iptables.yaml.j2 dest={{ cluster_dir }}/yml/nodelocaldns.yaml
when: "PROXY_MODE == 'iptables'"
2021-01-13 21:27:18 +08:00
- name: 删除dnscache部署
shell: "{{ base_dir }}/bin/kubectl delete -f {{ cluster_dir }}/yml/nodelocaldns.yaml || echo true; sleep 3"
tags: force_change_certs
when: 'CHANGE_CA|bool'
- name: 创建dnscache部署
shell: "{{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/nodelocaldns.yaml"
tags: force_change_certs
when: 'ENABLE_LOCAL_DNS_CACHE|bool'