mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-23 16:47:47 -02:30
Convert CoreDNS Secondary to kubectl_apply_stdin
Note that we're reapplying the RBAC/Sa/Config from coredns which is not strictly necessary, but harmless, when the secondary is enabled.
This commit is contained in:
@@ -32,6 +32,21 @@
|
||||
clusterIP: "{{ skydns_server }}"
|
||||
when: dns_mode in ['coredns', 'coredns_dual']
|
||||
|
||||
- name: Kubernetes Apps | CoreDNS Secondary
|
||||
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_secondary }}"
|
||||
coredns_ordinal_suffix: "-secondary"
|
||||
when:
|
||||
- dns_mode == 'coredns_dual'
|
||||
|
||||
- name: Kubernetes Apps | Start Resources
|
||||
kube:
|
||||
name: "{{ item.item.name }}"
|
||||
@@ -41,7 +56,6 @@
|
||||
filename: "{{ kube_config_dir }}/{{ item.item.file }}"
|
||||
state: "latest"
|
||||
with_items:
|
||||
- "{{ coredns_secondary_manifests.results | default({}) }}"
|
||||
- "{{ nodelocaldns_manifests.results | default({}) }}"
|
||||
- "{{ nodelocaldns_second_manifests.results | default({}) }}"
|
||||
when:
|
||||
|
||||
Reference in New Issue
Block a user