Skip to content

Commit

Permalink
fix typo in kubectl cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
tariq1890 committed Oct 4, 2023
1 parent 0bfecb7 commit c420404
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/scripts/checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@ check_nvidia_driver_pods_ready() {
kubectl get pods -l "app.kubernetes.io/component=nvidia-driver" -n ${TEST_NAMESPACE}

echo "Checking nvidia driver pod readiness"
is_pod_ready=$(kubectl get pods -l "app.kubernetes.io/component=nvidia-driver"-n ${TEST_NAMESPACE} -ojsonpath='{range .items[*]}{.status.conditions[?(@.type=="Ready")].status}{"\n"}{end}' 2>/dev/null || echo "terminated")
is_pod_ready=$(kubectl get pods -l "app.kubernetes.io/component=nvidia-driver" -n ${TEST_NAMESPACE} -ojsonpath='{range .items[*]}{.status.conditions[?(@.type=="Ready")].status}{"\n"}{end}' 2>/dev/null || echo "terminated")

if [ "${is_pod_ready}" = "True" ]; then
# Check if the pod is not in terminating state
is_pod_terminating=$(kubectl get pods -l "app.kubernetes.io/component=nvidia-driver" -n ${TEST_NAMESPACE} -o jsonpath='{.items[0].metadata.deletionGracePeriodSeconds}' 2>/dev/null || echo "terminated")
is_pod_terminating=$(kubectl get pods -l "app.kubernetes.io/component=nvidia-driver" -n ${TEST_NAMESPACE} -ojsonpath='{.items[0].metadata.deletionGracePeriodSeconds}' 2>/dev/null || echo "terminated")
if [ "${is_pod_terminating}" != "" ]; then
echo "nvidia driver pod is in terminating state..."
else
Expand All @@ -182,7 +182,6 @@ check_nvidia_driver_pods_ready() {

# Echo useful information on stdout
kubectl get pods -n ${TEST_NAMESPACE}
kubectl get nvidiadrivers default -o yaml

echo "Sleeping 5 seconds"
current_time=$((${current_time} + 5))
Expand Down

0 comments on commit c420404

Please sign in to comment.