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

@@ -10,11 +10,8 @@
- name: Kubernetes Apps | Set GlusterFS endpoint and PV
kube:
name: glusterfs
namespace: default
kubectl: "{{bin_dir}}/kubectl"
resource: "{{item.item.type}}"
filename: "{{kube_config_dir}}/{{item.item.dest}}"
filename: "{{ gluster_pv.results | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
state: "{{item.changed | ternary('latest','present') }}"
with_items: "{{ gluster_pv.results }}"
when: inventory_hostname == groups['kube-master'][0] and groups['gfs-cluster'] is defined