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

19 lines
764 B
YAML

- block:
- name: 准备dnscache的部署文件
template: src=dns/nodelocaldns-ipvs.yaml.j2 dest={{ cluster_dir }}/yml/nodelocaldns.yaml
when: "PROXY_MODE == 'ipvs'"
- name: 准备dnscache的部署文件
template: src=dns/nodelocaldns-iptables.yaml.j2 dest={{ cluster_dir }}/yml/nodelocaldns.yaml
when: "PROXY_MODE == 'iptables'"
- 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'