
This fixes a race condition in the gate, where `kubectl wait` was getting called before the objects being waited on existed, which causes it to fail [0]. [0]: https://github.com/kubernetes/kubernetes/issues/83242 Change-Id: Ideb04bbe62aaaf28f26b91c73412a009c8160265
18 lines
619 B
Bash
Executable File
18 lines
619 B
Bash
Executable File
#!/bin/bash
|
|
set -xe
|
|
sudo snap install kustomize && sudo snap install go --classic
|
|
make docker-build
|
|
kubectl wait --for=condition=Ready pods --all -A --timeout=180s
|
|
make deploy
|
|
#Wait for sip controller manager Pod
|
|
count=0
|
|
until [[ $(kubectl -n sipcluster-system get pod -l control-plane=controller-manager 2>/dev/null) ]]; do
|
|
count=$((count + 1))
|
|
if [[ ${count} -eq "120" ]]; then
|
|
echo ' Timed out waiting for sip controller manager pod to exist' >&3
|
|
return 1
|
|
fi
|
|
sleep 2
|
|
done
|
|
kubectl wait -n sipcluster-system pod -l control-plane=controller-manager --for=condition=ready --timeout=240s
|
|
kubectl get po -A |