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 ##############################################################################
19 cat << POD > $HOME/$pod_name.yaml
32 node.alpha.kubernetes-incubator.io/nfd-network-SRIOV: true
35 if $(kubectl version &>/dev/null); then
36 labels=$(kubectl get nodes -o json | jq .items[].metadata.labels)
39 if [[ $labels != *"node.alpha.kubernetes-incubator.io"* ]]; then
43 kubectl delete pod $pod_name --ignore-not-found=true --now
44 while kubectl get pod $pod_name &>/dev/null; do
47 kubectl create -f $HOME/$pod_name.yaml --validate=false
49 for pod in $pod_name; do
51 while [[ $status_phase != "Running" ]]; do
52 new_phase=$(kubectl get pods $pod | awk 'NR==2{print $3}')
53 if [[ $new_phase != $status_phase ]]; then
54 echo "$(date +%H:%M:%S) - $pod : $new_phase"
55 status_phase=$new_phase
57 if [[ $new_phase == "Err"* ]]; then