fix waiting for terminating pods

This commit is contained in:
Matthew Mosesohn 2017-09-24 11:08:18 +01:00
parent 5a60d8e9b6
commit 919713af28
3 changed files with 19 additions and 17 deletions

View file

@ -262,18 +262,18 @@ before_script:
tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
fi
# after_script:
# - >
# ansible-playbook -i inventory/inventory.ini tests/cloud_playbooks/delete-gce.yml -c local $LOG_LEVEL
# -e mode=${CLUSTER_MODE}
# -e test_id=${TEST_ID}
# -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
# -e gce_project_id=${GCE_PROJECT_ID}
# -e gce_service_account_email=${GCE_ACCOUNT}
# -e gce_credentials_file=${HOME}/.ssh/gce.json
# -e cloud_image=${CLOUD_IMAGE}
# -e inventory_path=${PWD}/inventory/inventory.ini
# -e cloud_region=${CLOUD_REGION}
after_script:
- >
ansible-playbook -i inventory/inventory.ini tests/cloud_playbooks/delete-gce.yml -c local $LOG_LEVEL
-e mode=${CLUSTER_MODE}
-e test_id=${TEST_ID}
-e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
-e gce_project_id=${GCE_PROJECT_ID}
-e gce_service_account_email=${GCE_ACCOUNT}
-e gce_credentials_file=${HOME}/.ssh/gce.json
-e cloud_image=${CLOUD_IMAGE}
-e inventory_path=${PWD}/inventory/inventory.ini
-e cloud_region=${CLOUD_REGION}
# Test matrix. Leave the comments for markup scripts.
.coreos_calico_aio_variables: &coreos_calico_aio_variables

View file

@ -17,7 +17,6 @@ networking:
podSubnet: {{ kube_pods_subnet }}
kubernetesVersion: {{ kube_version }}
cloudProvider: {{ cloud_provider|default('') }}
#TODO: cloud provider conf file
authorizationModes:
- Node
{% for mode in authorization_modes %}
@ -53,7 +52,6 @@ apiServerExtraArgs:
runtime-config: {{ kube_api_runtime_config }}
{% endif %}
allow-privileged: "true"
#TODO: Custom flags compatible with kubeadm
controllerManagerExtraArgs:
node-monitor-grace-period: {{ kube_controller_node_monitor_grace_period }}
node-monitor-period: {{ kube_controller_node_monitor_period }}
@ -61,7 +59,6 @@ controllerManagerExtraArgs:
{% if kube_feature_gates %}
feature-gates: {{ kube_feature_gates|join(',') }}
{% endif %}
#schedulerExtraArgs:
apiServerCertSANs:
{% for san in apiserver_sans.split(' ') | unique %}
- {{ san }}

View file

@ -13,8 +13,8 @@
when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
- name: Get pod names
shell: "{{bin_dir}}/kubectl get pods -o json"
- name: Wait for pods to be ready
shell: "{{bin_dir}}/kubectl get pods"
register: pods
until:
- '"ContainerCreating" not in pods.stdout'
@ -24,6 +24,11 @@
delay: 2
no_log: true
- name: Get pod names
shell: "{{bin_dir}}/kubectl get pods -o json"
register: pods
no_log: true
- name: Get hostnet pods
command: "{{bin_dir}}/kubectl get pods -o
jsonpath='{range .items[?(.spec.hostNetwork)]}{.metadata.name} {.status.podIP} {.status.containerStatuses} {end}'"