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

@@ -1,14 +1,11 @@
---
- name: Cilium | Start Resources
kube:
name: "{{item.item.name}}"
namespace: "kube-system"
kubectl: "{{bin_dir}}/kubectl"
resource: "{{item.item.type}}"
filename: "{{kube_config_dir}}/{{item.item.file}}"
filename: "{{ cilium_node_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
state: "latest"
with_items: "{{ cilium_node_manifests.results }}"
when: inventory_hostname == groups['kube-master'][0] and not item is skipped
when: inventory_hostname == groups['kube-master'][0]
- name: Cilium | Wait for pods to run
command: "{{bin_dir}}/kubectl -n kube-system get pods -l k8s-app=cilium -o jsonpath='{.items[?(@.status.containerStatuses[0].ready==false)].metadata.name}'" # noqa 601