Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap: don't make openshift unit wait for kas #1659

Merged
merged 1 commit into from
Apr 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions data/data/bootstrap/files/usr/local/bin/openshift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,6 @@ kubectl() {
done
}

wait_for_pods() {
echo "Waiting for pods in namespace $1..."
while true
do
out=$(kubectl --namespace "$1" get pods --output custom-columns=STATUS:.status.phase,NAME:.metadata.name --no-headers=true)
echo "$out"

# make sure kubectl returns at least one status
if [ "$(wc --lines <<< "$out")" -eq 0 ]
then
echo "No pods were found. Waiting for 5 seconds..."
sleep 5
continue
fi

if ! grep --invert-match '^Running' <<< "$out"
then
return
fi

echo "Not all pods available yet. Waiting for 5 seconds..."
sleep 5
done
set -e
}

# Wait for Kubernetes pods
wait_for_pods kube-system

for file in $(find . -maxdepth 1 -type f | sort)
do
echo "Creating object from file: $file ..."
Expand Down