diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2afc91a5c..1265b0e99 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -259,18 +259,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 diff --git a/roles/kubernetes/master/templates/kubeadm-config.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.yaml.j2 index 7e906efa9..c8dfd9524 100644 --- a/roles/kubernetes/master/templates/kubeadm-config.yaml.j2 +++ b/roles/kubernetes/master/templates/kubeadm-config.yaml.j2 @@ -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 }} diff --git a/tests/testcases/030_check-network.yml b/tests/testcases/030_check-network.yml index 9d0c44e25..2fa78545f 100644 --- a/tests/testcases/030_check-network.yml +++ b/tests/testcases/030_check-network.yml @@ -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}'"