File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,12 +21,24 @@ set -x
2121
2222DURATION_TIME=${DURATION_TIME:- 10}
2323
24- NODE_NAMES=$( /usr/local/bin/oc get node -o name -l node-role.kubernetes.io/worker)
24+ if ! command -v oc; then
25+ PATH=$PATH :/home/zuul/bin
26+ fi
27+
28+ if ! [ -f " $HOME /.kube/config" ]; then
29+ if [ -f " /home/zuul/.crc/machines/crc/kubeconfig" ]; then
30+ export KUBECONFIG=/home/zuul/.crc/machines/crc/kubeconfig
31+ elif [ -f " /home/zuul/.kube/config" ]; then
32+ export KUBECONFIG=/home/zuul/.kube/config
33+ fi
34+ fi
35+
36+ NODE_NAMES=$( oc get node -o name -l node-role.kubernetes.io/worker)
2537if [ -z " $NODE_NAMES " ]; then
2638 echo " Unable to determine node name with 'oc' command."
2739 exit 1
2840fi
2941
3042for node in $NODE_NAMES ; do
31- /usr/local/bin/ oc debug $node -T -- chroot /host /usr/bin/bash -c " crictl stats -a -s $DURATION_TIME | (sed -u 1q; sort -k 2 -h -r)"
43+ oc debug " $node " -T -- chroot /host /usr/bin/bash -c " crictl stats -a -s $DURATION_TIME | (sed -u 1q; sort -k 2 -h -r)"
3244done
You can’t perform that action at this time.
0 commit comments