Optimize kube resources creation (#4572)

This commit is contained in:
andreyshestakov
2019-04-23 09:34:10 +03:00
committed by Kubernetes Prow Robot
parent 09fe95bc60
commit f8fdc0cd93
22 changed files with 31 additions and 118 deletions

View File

@@ -24,16 +24,9 @@
- name: Start of Calico kube controllers
kube:
name: "{{item.item.name}}"
namespace: "kube-system"
kubectl: "{{bin_dir}}/kubectl"
resource: "{{item.item.type}}"
filename: "{{kube_config_dir}}/{{item.item.file}}"
filename: "{{ calico_node_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
state: "latest"
with_items:
- "{{ calico_kube_manifests.results }}"
when:
- inventory_hostname == groups['kube-master'][0]
- not item is skipped
loop_control:
label: "{{ item.item.file }}"