2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
15 source _common_test.sh
22 cat << POD > $HOME/$pod_name.yaml
35 node.alpha.kubernetes-incubator.io/nfd-network-SRIOV: true
38 if $(kubectl version &>/dev/null); then
39 labels=$(kubectl get nodes -o json | jq .items[].metadata.labels)
42 if [[ $labels != *"node.alpha.kubernetes-incubator.io"* ]]; then
46 kubectl delete pod $pod_name --ignore-not-found=true --now
47 while kubectl get pod $pod_name &>/dev/null; do
50 kubectl create -f $HOME/$pod_name.yaml --validate=false
52 for pod in $pod_name; do
54 while [[ $status_phase != "Running" ]]; do
55 new_phase=$(kubectl get pods $pod | awk 'NR==2{print $3}')
56 if [[ $new_phase != $status_phase ]]; then
57 echo "$(date +%H:%M:%S) - $pod : $new_phase"
58 status_phase=$new_phase
60 if [[ $new_phase == "Err"* ]]; then