Skip to content

Commit

Permalink
environment check script should check all pods
Browse files Browse the repository at this point in the history
instead of just the first pod that it finds

Signed-off-by: Andrew Lavery <laverya@umich.edu>
  • Loading branch information
laverya authored and innobead committed Jun 4, 2021
1 parent 89b5a40 commit ae45a58
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/environment_check.sh
Original file line number Diff line number Diff line change
@@ -78,7 +78,10 @@ validate_ds() {
local allSupported=true
local pods=$(kubectl -l app=longhorn-environment-check get po -o json)

for ((i=0; i<1; i++)); do
local ds=$(kubectl get ds/longhorn-environment-check -o json)
local desiredNumberScheduled=$(echo $ds | jq .status.desiredNumberScheduled)

for ((i=0; i<desiredNumberScheduled; i++)); do
local pod=$(echo $pods | jq .items[$i])
local nodeName=$(echo $pod | jq -r .spec.nodeName)
local mountPropagation=$(echo $pod | jq -r '.spec.containers[0].volumeMounts[] | select(.name=="mountpoint") | .mountPropagation')

0 comments on commit ae45a58

Please sign in to comment.