mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-19 23:07:47 -02:30
Convert CoreDNS primary to kubectl_apply_stdin
This commit is contained in:
@@ -11,14 +11,6 @@
|
||||
delay: 1
|
||||
when: inventory_hostname == groups['kube_control_plane'][0]
|
||||
|
||||
- name: Kubernetes Apps | CoreDNS
|
||||
import_tasks: "coredns.yml"
|
||||
when:
|
||||
- dns_mode in ['coredns', 'coredns_dual']
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
tags:
|
||||
- coredns
|
||||
|
||||
- name: Kubernetes Apps | nodelocalDNS
|
||||
import_tasks: "nodelocaldns.yml"
|
||||
when:
|
||||
@@ -27,6 +19,19 @@
|
||||
tags:
|
||||
- nodelocaldns
|
||||
|
||||
- name: Kubernetes Apps | CoreDNS
|
||||
command:
|
||||
cmd: "{{ kubectl_apply_stdin }}"
|
||||
stdin: "{{ lookup('template', item) }}"
|
||||
delegate_to: "{{ groups['kube_control_plane'][0] }}"
|
||||
run_once: true
|
||||
loop: "{{ coredns_manifests | flatten }}"
|
||||
tags:
|
||||
- coredns
|
||||
vars:
|
||||
clusterIP: "{{ skydns_server }}"
|
||||
when: dns_mode in ['coredns', 'coredns_dual']
|
||||
|
||||
- name: Kubernetes Apps | Start Resources
|
||||
kube:
|
||||
name: "{{ item.item.name }}"
|
||||
@@ -36,7 +41,6 @@
|
||||
filename: "{{ kube_config_dir }}/{{ item.item.file }}"
|
||||
state: "latest"
|
||||
with_items:
|
||||
- "{{ coredns_manifests.results | default({}) }}"
|
||||
- "{{ coredns_secondary_manifests.results | default({}) }}"
|
||||
- "{{ nodelocaldns_manifests.results | default({}) }}"
|
||||
- "{{ nodelocaldns_second_manifests.results | default({}) }}"
|
||||
|
||||
Reference in New Issue
Block a user