File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 9191 command : " {{ bin_dir }}/kubectl rollout status deploy --namespace test agnhost --timeout=180s"
9292 changed_when : false
9393 - name : Get pod names
94- command : " {{ bin_dir }}/kubectl get pods -n test -o json"
94+ command : " {{ bin_dir }}/kubectl get pods -n test --field-selector status.phase=Running - o json"
9595 changed_when : false
9696 register : pods_json
9797
9898 - name : Check pods IP are in correct network
9999 assert :
100- that : pods
101- | selectattr('status.phase', '==', 'Running')
102- | selectattr('status.podIP', 'ansible.utils.in_network', kube_pods_subnet)
103- | length == 2
100+ that :
101+ - not ipv4_stack or
102+ (pods | map(attribute='status.podIPs') | flatten | map(attribute='ip)
103+ | select('ansible.utils.in_network', kube_pods_subnet)) | length == 2
104+ - not ipv6_stack or
105+ (pods | map(attribute='status.podIPs') | flatten | map(attribute='ip)
106+ | select('ansible.utils.in_network', kube_pods_subnet_ipv6)) | length == 2
104107
105108 - name : Curl between pods is working
106109 command : " {{ bin_dir }}/kubectl -n test exec {{ item[0].metadata.name }} -- curl {{ item[1].status.podIP | ansible.utils.ipwrap}}:8080"
You can’t perform that action at this time.
0 commit comments